a problem with routes in 6.1 when configuring IPv6 address using both
autoconfigured addresses at the same time with statically configured
addresses from different prefixes.
If the host is not accepting router advertisements everything seems to work
fine:
# sysctl -a | grep rtad
net.inet6.ip6.accept_rtadv: 0
# ifconfig fxp0 inet6 3ffe:101::1 prefixlen 64
# netstat -rn -f inet6 | grep 3ffe:101
3ffe:101::/64 link#1 UC
fxp0
3ffe:101::1 00:12:3f:71:3e:ef UHL
lo0
#
As you can see I have two routes one for the loopback and one for the prefix
as it should GREAT!
Now if I’ll set the host to accept router advertisements then the route for
the 3ffe:101:: prefix will be deleted as the first router advertisement is
received. The router advertises prefix 3ffe:14b8:400:101::/64.
# sysctl net.inet6.ip6.accept_rtadv=1
net.inet6.ip6.accept_rtadv: 0 -> 1
# rtsol -a
# netstat -rn -f inet6 | grep 3ffe:101
3ffe:101::1 00:12:3f:71:3e:ef UHL
lo0
#
It seems that the route is deleted because in function pfxlist_onlink_check()
there is a check that if the state has changed to DETACHED the
nd6_prefix_offlink will be called which then removes the route:
if ((pr->ndpr_stateflags & NDPRF_DETACHED) != 0 &&
(pr->ndpr_stateflags & NDPRF_ONLINK) != 0) {
if ((e = nd6_prefix_offlink(pr)) != 0) {
nd6log((LOG_ERR,
“pfxlist_onlink_check: failed to ”
“make %s/%d offlink, errno=%d\n”,
ip6_sprintf(&pr->ndpr_prefix.sin6_addr),
pr->ndpr_plen, e));
}
}
Result is the same if I first do the autoconfiguration part and then after
I have the autoconfigured address add the manually configured address the
result is that there wont be any route for the manually configured prefix
(3ffe:101::/64).
http://www.freebsd.org/cgi/query-pr.cgi?pr=104851
>Category: kern
>Responsible: freebsd-bugs
>Synopsis: On link routes not configured when using both IPv6 autoconfiguration and manual configuration
>Arrival-Date: Fri Oct 27 05:20:17 GMT 2006