Re: IPPROTO_DIVERT and PF_INET6

2008-05-13 Thread Edwin Groothuis
On Wed, May 14, 2008 at 12:37:58AM +1000, Edwin Groothuis wrote: > It contains links to patches for FreeBSD 6.3 and the nat6to4d.c. Needless to say that the code of nat6to4d.c is a proof-of-concept and is missing essential features like garbage-collection and configurationability. Edwin -- Edwi

Re: IPPROTO_DIVERT and PF_INET6

2008-05-13 Thread Edwin Groothuis
On Wed, May 07, 2008 at 08:40:56AM +0100, Bruce M. Simpson wrote: > Julian Elischer wrote: > >actually the divert sockets should really not be in PF_INET > >they could deliver both inet and inet6 packets. > >the sockaddr that they return (and which needs to be read for divert > >to make sense) coul

Re: IPPROTO_DIVERT and PF_INET6

2008-05-07 Thread Julian Elischer
Bruce M. Simpson wrote: Julian Elischer wrote: actually the divert sockets should really not be in PF_INET they could deliver both inet and inet6 packets. the sockaddr that they return (and which needs to be read for divert to make sense) could be used to distinguish between them. Good point.

Re: IPPROTO_DIVERT and PF_INET6

2008-05-07 Thread Bruce M. Simpson
Julian Elischer wrote: actually the divert sockets should really not be in PF_INET they could deliver both inet and inet6 packets. the sockaddr that they return (and which needs to be read for divert to make sense) could be used to distinguish between them. Good point. I'd forgotten that they w

Re: IPPROTO_DIVERT and PF_INET6

2008-05-07 Thread Julian Elischer
Bruce M. Simpson wrote: Julian Elischer wrote: you could implement a whole new protocol family of which there was a single protocol.. divert. That's sheer overkill for what Edwin needs to be able to do. We already have a bunch of apps which use divert sockets in the IPv4 space, why should the

Re: IPPROTO_DIVERT and PF_INET6

2008-05-06 Thread Bruce M. Simpson
Julian Elischer wrote: you could implement a whole new protocol family of which there was a single protocol.. divert. That's sheer overkill for what Edwin needs to be able to do. We already have a bunch of apps which use divert sockets in the IPv4 space, why should the existing semantics chang

Re: IPPROTO_DIVERT and PF_INET6

2008-05-05 Thread Edwin Groothuis
On Mon, May 05, 2008 at 04:18:54PM -0700, Julian Elischer wrote: > Edwin Groothuis wrote: > >On Mon, May 05, 2008 at 01:15:29PM -0700, Julian Elischer wrote: > >>>This should provide a direct answer to you question of "why"? But I > >>>suspect the underlying question is why divert sockets aren't s

Re: IPPROTO_DIVERT and PF_INET6

2008-05-05 Thread Julian Elischer
Edwin Groothuis wrote: On Mon, May 05, 2008 at 01:15:29PM -0700, Julian Elischer wrote: This should provide a direct answer to you question of "why"? But I suspect the underlying question is why divert sockets aren't supported for IPv6. I don't know why. because no=one has done it and because

Re: IPPROTO_DIVERT and PF_INET6

2008-05-05 Thread Edwin Groothuis
On Mon, May 05, 2008 at 01:15:29PM -0700, Julian Elischer wrote: > >This should provide a direct answer to you question of "why"? But I > >suspect the underlying question is why divert sockets aren't supported > >for IPv6. I don't know why. > > because no=one has done it and because divert socka

Re: IPPROTO_DIVERT and PF_INET6

2008-05-05 Thread Julian Elischer
JINMEI Tatuya / 神明達哉 wrote: This should provide a direct answer to you question of "why"? But I suspect the underlying question is why divert sockets aren't supported for IPv6. I don't know why. because no=one has done it and because divert sockaddrs are ipv4 sockaddrs you would have to ma

Re: IPPROTO_DIVERT and PF_INET6

2008-05-05 Thread JINMEI Tatuya / 神明達哉
At Sat, 3 May 2008 20:00:43 +1000, Edwin Groothuis <[EMAIL PROTECTED]> wrote: > Before somebody shoots me down on it: I know that ipfw_divert() is > not suitable for IPv6 packets. [snip] > which is what I expected. So why doesn't this get displayed for the > IPv6 sockets? I don't know much abou

Re: IPPROTO_DIVERT and PF_INET6

2008-05-03 Thread Edwin Groothuis
On Sat, May 03, 2008 at 08:00:43PM +1000, Edwin Groothuis wrote: > Before somebody shoots me down on it: I know that ipfw_divert() is > not suitable for IPv6 packets. Please note that the above statement is only partly true now: on my laptop ipfw_divert() can handle IPv6 forwards, but the problem

IPPROTO_DIVERT and PF_INET6

2008-05-03 Thread Edwin Groothuis
Greetings, Before somebody shoots me down on it: I know that ipfw_divert() is not suitable for IPv6 packets. So, to the point. This code: struct sockaddr_in6 addr6; struct in6_addr ip6_any = IN6ADDR_ANY_INIT; sin = socket(PF_INET6, SOCK_RAW, IPPROTO_DIVERT);