Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2003 15:12:49 +0200 (EET)
From:      Pekka Savola <pekkas@netcore.fi>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/48917: creating stf 6to4 IPv6 pseudo-interface adds wrong routes
Message-ID:  <200303041312.h24DCnjQ000393@gap.netcore.fi>

next in thread | raw e-mail | index | archive | help

>Number:         48917
>Category:       kern
>Synopsis:       creating stf 6to4 IPv6 pseudo-interface adds wrong routes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 04 05:20:08 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Pekka Savola
>Release:        FreeBSD 4.8-RC i386
>Organization:
-
>Environment:
System: FreeBSD gap.netcore.fi 4.8-RC FreeBSD 4.8-RC #3: Tue Mar 4 09:57:41 EET 2003 root@gap.netcore.fi:/usr/home/share/obj/usr/src/sys/GAP i386
>Description:
There seems to be an issue (since about FreeBSD-4.5, 4.6 or so) that the
IPv6 6to4 "stf" pseudo-interface gets initialized wrong.

I've also brought this up with snap-users@kame.net (even though I don't use
a SNAP) on "Tue, 5 Nov 2002 18:23:23 +0200 (EET)", no help.

I use the 6to4 anycast address (default configuration), and after booting
up, the routing table looks like:

# netstat -nr | grep 2002
default                           2002:c058:6301::              UGSc	stf0
2002::/24                         ::1                           UGRSc	lo0 =>
2002::/16                         2002:d436:1c91::1             Uc	rl0
2002:7f00::/24                    ::1                           UGRSc	lo0
2002:d436:1c91::/64               link#1                        UC	rl0
2002:d436:1c91::1                 00:a0:d2:1a:01:3c             UHL	lo0
2002:e000::/20                    ::1                           UGRSc	lo0
2002:ff00::/24                    ::1                           UGRSc	lo0

The problem is the "2002::/16" interface route.  It points to a physical
interface (the first one), and lists my own address as the gateway.

# route get -inet6 2002::/16
   route to: 2002::
destination: 2002::
       mask: ffff::
  interface: rl0
      flags: <UP,DONE,PRCLONING>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu	expire
       0         0         0         0         0         0      1500	0 

The problem can be seen if you try to ping6 another 6to4 address (2002::/16)
which is on-link with all the 6to4 addresses; kernel complains:

nd6_storelladdr: something odd happens

.. and ping6 fails.  Other pings which go through the relay, default route,
work fine.

This can be remedied by deleting the bogus route and adding the correct one
instead:

route add -inet6 2002::/16 -iface stf0

>How-To-Repeat:

Try configuration similar to:

ipv6_ifconfig_rl0="2002:d436:1c91::1 prefixlen 64" # local network
ipv6_network_interfaces="rl0 stf0"
stf_interface_ipv4addr="212.54.28.145"       # Local IPv4 addr for 6to4 IPv6 over IPv4
ipv6_gateway_enable="YES"
ipv6_defaultrouter="2002:c058:6301::"

and ping6 another 6to4 node (e.g. "gap.netcore.fi").

(node that stf_interface_ipv4addr and ipv6_ifconfig_rl0 naturally have to
correspond to your public IPv4 address)

>Fix:

workaround:

route delete -inet6 2002::/16 
route add -inet6 2002::/16 -iface stf0


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303041312.h24DCnjQ000393>