[ECOS] Using rtrequest to add an IPv6 default route

Shaun Louie sal@microplex.com
Thu May 8 22:52:00 GMT 2008


Hello,

In the defrouter_addreq function in 
"/net/bsd_tcpip/current/src/sys/netinet6/nd6_rtr.c" it will do a 
rtrequest for the IPv6 link-local address of the chosen default router 
(from router advertisements).  However, I'm getting a 351 (ENETUNREACH) 
error code from rtrequest.  I'm wondering if maybe the ifa_ifwithnet 
function (/net/bsd_tcpip/current/src/sys/net/if.c) doesn't handle IPv6 
addresses properly and is causing ifa_ifwithroute to return NULL. 

The interface is pre-programmed with the link local address:  
fe80::80:72ff:fe00:62.  I've verified this with the ioctl SIOCGIFCONF 
command (it actually reports fe80:1::80:72ff:fe00:62, but that's because 
FreeBSD temporarily adds an interface index after the prefix)

The router's link local address is: fe80::21f:5bff:fe00:a5cd

My debugging environment is limited for about the next week, so I'm 
unable to step through the code.  I've been using diag_printf(), which 
is only getting me so far.  I was hoping to hear if someone has gotten 
this working (i.e. an IPv6 connection that uses the default gateway 
determined from router advertisements), and what I might need to do to 
get this to work.

Thanks,
Shaun Louie

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list