CFR: netinet6/nd6.c - route add -inet

John Hay jhay at meraka.org.za
Mon Sep 11 23:42:10 PDT 2006


Is there anybody that would care to look over this change please? Or
is it ok to commit it?

For my test setup I have two machines, the first called rtrg, which
I'm working on and rtr2, the one I want to "route" to. So my
/etc/hosts have this in:

2001:4200:7000:15:202:6fff:fe22:9547    rtrg
2001:4200:7000:15:202:6fff:fe41:1927    rtr2

If I add a route (on rtrg) like this, I do not get an error while adding
it:

route add -inet6 rtr2 rtrg  -interface -llinfo

But the first time I use it, the kernel spits out this message:

nd6_storelladdr: sdl_alen == 0

So I had a look and tweaked sys/netinet6/nd6.c:nd6_rtrequest() a little
and now it is working. Now I won't pretend that I have my head around
all the IPv6 routing/ndp intricasies, so I would really like some more
eyes over this.

With this and my FreeBSD/IPv6 port of olsrd I can run multiple wireless
interfaces with the same IPv6 subnet and olsrd can make it all work.

The diff is against RELENG_6

Index: nd6.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/nd6.c,v
retrieving revision 1.48.2.13
diff -u -r1.48.2.13 nd6.c
--- nd6.c	17 Jun 2006 17:58:33 -0000	1.48.2.13
+++ nd6.c	8 Sep 2006 09:16:58 -0000
@@ -1392,6 +1392,8 @@
 					    ip6_sprintf(&llsol), error));
 				}
 			}
+		} else if (req == RTM_ADD && SDL(gate)->sdl_alen == 0) {
+			ln->ln_state = ND6_LLINFO_INCOMPLETE;
 		}
 		break;

John
-- 
John Hay -- John.Hay at meraka.csir.co.za / jhay at FreeBSD.org


More information about the freebsd-net mailing list