Hello.
In my routing table I see entries after Neighbor Discovery Protocol
processed:
...
2a02:6b8:0:401:51:4809:8158:1dcd 00:22:fb:3d:82:fe UHLW vlan438
...
I'd like to catch them via a routing socket when they appear.
First, try to add a static entry:
ndp -s 2a02:6b8:0:403::1:1 00:0e:0c:09:2e:7b
and look at route -n monitor output:
got message of size 240 on Wed Feb 9 17:26:50 2011
RTM_ADD: Add Route: len 240, pid: 82741, seq 2, errno 0,
flags:<HOST,DONE,STATIC>
locks: inits:
sockaddrs: <DST,GATEWAY>
2a02:6b8:0:403::1:1 0.e.c.9.2e.7b
We have two sections here - DST and GATEWAY. DST is a IPv6 address
(sa_family == AF_INET6) and GATEWAY is a MAC (sa_family == AF_LINK).
Just for info sockaddr_dl looks like this:
$1 = {sdl_len = 54 '6', sdl_family = 18 '\022', sdl_index = 24, sdl_type
= 135 '\207', sdl_nlen = 0 '\0',
sdl_alen = 6 '\006', sdl_slen = 0 '\0', sdl_data = "\000\016\f\t.{",
'\0' <repeats 39 times>}
Looks good. Lets wait for NDP entry...
Here is it:
got message of size 328 on Wed Feb 9 17:27:11 2011
RTM_ADD: Add Route: len 328, pid: 0, seq 0, errno 0,
flags:<UP,HOST,DONE,LLINFO,WASCLONED>
locks: inits:
sockaddrs: <DST,GATEWAY,IFP,IFA>
2a02:6b8:0:40c:daa2:5eff:fe8c:139 vlan438:0.30.48.33.4.92
fe80::230:48ff:fe33:492%vlan438
We have four section here DST, GATEWAY, IFP, IFA.
DST is IPv6 address, IFP and IFA I don't care and GATEWAY section is empty.
Let's see why:
$1 = {sdl_len = 54 '6', sdl_family = 18 '\022', sdl_index = 8, sdl_type
= 135 '\207', sdl_nlen = 0 '\0',
sdl_alen = 0 '\0', sdl_slen = 0 '\0', sdl_data = '\0' <repeats 45 times>}
family is AF_LINK (18), it's a correct one. But sdl_alen, sdl_data are
zeros.
I see this for all routing messages from NDP. All created routing table
entries are good (no problems here).
Why sockaddr_dl in GATEWAY section has a zero address? Is it a bug?
--
Sem.
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"