IPPROTO_DIVERT and PF_INET6

Edwin Groothuis edwin at mavetju.org
Tue May 13 14:38:02 UTC 2008


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) could be used to distinguish between them.
> 
> Good point. I'd forgotten that they were abusing the fields in sin_zero. 
> This is not OK for IPv6, although the kludge can still be perpetuated by 
> looking at sa_len and stashing what divert wants at the end of sockaddr_in6.
> 
> So there IS a case for making them a separate protocol family if 
> someone's going to do a clean implementation of divert sockets for IPv6.

I have it more or less working!

See my "FreeBSD IPv6 Divert socket adventures" at 
	http://www.mavetju.org/weblog/html/00231.html (1)
	http://www.mavetju.org/weblog/html/00232.html (2)
	http://www.mavetju.org/weblog/html/00233.html (3)

It contains links to patches for FreeBSD 6.3 and the nat6to4d.c.
Please read the disclaimer in the second last paragraph of the 3rd
article about the rough edges on it. I'm very keen on getting help
from somebody to check it and to polish it up once I'm happy with
it. For example with regarding to the "inpcb" things which I have
absolutely no idea about what they are or what they do, or how to
properly manage them.

Edwin
-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin at mavetju.org    |              Weblog: http://www.mavetju.org/weblog/


More information about the freebsd-net mailing list