kern/158665: kernel pagefault in in6_setscope()
cuicui at gmail.com
Tue Jul 5 10:10:12 UTC 2011
>Synopsis: kernel pagefault in in6_setscope()
>Arrival-Date: Tue Jul 05 10:10:11 UTC 2011
>Originator: Mike Cui
FreeBSD router 8.2-RELEASE FreeBSD 8.2-RELEASE #3
When I set up a 6to4 tunnel device (stf0) and put it in output only mode according to man stf(4):
# ifconfig ne0 inet 188.8.131.52 netmask 0xffffff00
# ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 \
prefixlen 16 alias deprecated link0
# route add -inet6 2002:: -prefixlen 16 ::1
# route change -inet6 2002:: -prefixlen 16 ::1 -ifp stf0
The kernel often crashes sending traffic to other other 2002::/16 hosts. I think the problem is the "deprecated" address that's causing problems when trying to resolve ipv6 scope.
The instruction causing the fault is:
c069cee8: 0f b1 96 18 02 00 00 cmpxchg %edx,0x218(%esi)
which I think corresponds to this line in the source:
in6_setscope(struct in6_addr *in6, struct ifnet *ifp, u_int32_t *ret_id)
u_int32_t zoneid = 0;
struct scope6_id *sid;
IF_AFDATA_LOCK(ifp); <----- HERE
The fault virtual address is 0x218, which seems to suggest that ifp passed into this function is NULL.
1. On a machine with both a public IPv6 address (not 6to4 address) as well as IPv4, create a stf0 device and put it in "output only" mode according to man stf(4).
2. Ping another host using its 6to4 address (2002::/16).
More information about the freebsd-bugs