From owner-freebsd-bugs Tue Mar 4 5:20:14 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27D3A37B401 for ; Tue, 4 Mar 2003 05:20:11 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CB0743FB1 for ; Tue, 4 Mar 2003 05:20:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h24DK9NS081001 for ; Tue, 4 Mar 2003 05:20:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h24DK9B7081000; Tue, 4 Mar 2003 05:20:09 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11E7B37B401 for ; Tue, 4 Mar 2003 05:12:55 -0800 (PST) Received: from gap.netcore.fi (a145d25.elisa.omakaista.fi [212.54.28.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32E5C43FEC for ; Tue, 4 Mar 2003 05:12:53 -0800 (PST) (envelope-from oldwolf@gap.netcore.fi) Received: from gap.netcore.fi (oldwolf@localhost [127.0.0.1]) by gap.netcore.fi (8.12.8/8.12.8) with ESMTP id h24DCnjY000394 for ; Tue, 4 Mar 2003 15:12:50 +0200 (EET) (envelope-from oldwolf@gap.netcore.fi) Received: (from oldwolf@localhost) by gap.netcore.fi (8.12.8/8.12.8/Submit) id h24DCnjQ000393; Tue, 4 Mar 2003 15:12:49 +0200 (EET) Message-Id: <200303041312.h24DCnjQ000393@gap.netcore.fi> Date: Tue, 4 Mar 2003 15:12:49 +0200 (EET) From: Pekka Savola To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/48917: creating stf 6to4 IPv6 pseudo-interface adds wrong routes Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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: 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