1 msgFwd: [networking-discuss] uperf - A network ben...
27 msgProblems with netgraph
1 msgRe: kern/123429: [nfe] [hang] 'ifconfig nfe up'...
1 msgtimewait state memory leak
1 msgRe: Is it possible to change BSD licence to GPL...
4 msgChange from BSDL to GPL
1 msgIs it possible to change BSD licence to GPL for...
5 msgCan I port 4.4BSD-Lite's TCP/IP protocol stack ...
3 msgTrying to find source of collisions
1 msgRe: kern/119516: [ip6] [panic] _mtx_lock_sleep:...
1 msgRe: kern/122858: [nsswitch] nsswitch in 7.0 is ...
1 msgRe: kern/91594: [em] FreeBSD > 5.4 w/ACPI fa...
1 msgRe: kern/105925: Regression in ifconfig(8) + vl...
1 msgRe: bin/108895: pppd(8): PPPoE dead connections...
1 msgRe: kern/109308: [pppd] [panic] Multiple panics...
1 msgRe: kern/109733: [bge] bge link state issues [r...
2 msgNetwork Patches from -RELEASE to -STABLE 7.0
24 msgTroubles with em on FreeBSD 7

IPPROTO_DIVERT and PF_INET6
\ Edwin Groothuis (3 May 2008)
. \ Edwin Groothuis (3 May 2008)
. \ JINMEI Tatuya / (5 May 2008)
. . \ Julian Elischer (5 May 2008)
. . . \ Edwin Groothuis (5 May 2008)
. . . . \ Julian Elischer (5 May 2008)
. . . . . \ Edwin Groothuis (5 May 2008)
. . . . . \ Bruce M. Simpson (7 May 2008)
. . . . . . \ Julian Elischer (7 May 2008)
. . . . . . . \ Bruce M. Simpson (7 May 2008)
. . . . . . . . \ Julian Elischer (7 May 2008)
. . . . . . . . \ Edwin Groothuis (13 May 2008)
. . . . . . . . . \ Edwin Groothuis (13 May 2008)

11 msgMFC of em/igb drivers
Subject:IPPROTO_DIVERT and PF_INET6
Group:Freebsd-net
From:Edwin Groothuis
Date:3 May 2008


 
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);
if (sin == -1)
errx(1, "Unable to create sin socket.");
if (sin > fdmax)
fdmax = sin;

addr6.sin6_family = AF_INET6;
addr6.sin6_addr = ip6_any;
addr6.sin6_port = htons(8669);

if (bind(sin, (struct sockaddr *) &addr6, sizeof(addr6)) == -1)
errx(1, "Unable to bind incoming divert socket: %s",
strerror(errno));

compiles and run fine, but it gives me this in the lsof output:

nat6to4d 67887 root 3u IPv6 0xc8b05000 0t0 HOPOPTS *:*

HOPOPTS is "0" according to /etc/protocols. Making everything IPv4,
it gives this:

nat6to4d 67899 root 3u IPv4 0xc865421c 0t0 DIVERT *:8669

which is what I expected. So why doesn't this get displayed for the
IPv6 sockets?

Edwin

--
Edwin Groothuis | Personal website: http://www.mavetju.org
edwin | Weblog: http://www.mavetju.org/weblog/
_______________________________________________
freebsd-net mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe"


© 2004-2008 readlist.com