From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 20 05:40:22 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 A997A16A412 for ; Wed, 20 Sep 2006 05:40:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 007CA43D46 for ; Wed, 20 Sep 2006 05:40:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8K5eLls096180 for ; Wed, 20 Sep 2006 05:40:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8K5eL0N096179; Wed, 20 Sep 2006 05:40:21 GMT (envelope-from gnats) Resent-Date: Wed, 20 Sep 2006 05:40:21 GMT Resent-Message-Id: <200609200540.k8K5eL0N096179@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, JINMEI Tatuya Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DCA016A403 for ; Wed, 20 Sep 2006 05:36:45 +0000 (UTC) (envelope-from jinmei@shuttle.wide.toshiba.co.jp) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADB9243D45 for ; Wed, 20 Sep 2006 05:36:44 +0000 (GMT) (envelope-from jinmei@shuttle.wide.toshiba.co.jp) Received: from shuttle.wide.toshiba.co.jp (localhost [::1]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id 1BFD615267 for ; Wed, 20 Sep 2006 14:36:43 +0900 (JST) Received: (from jinmei@localhost) by shuttle.wide.toshiba.co.jp (8.12.8p1/8.12.6/Submit) id k8K5agKO050954; Wed, 20 Sep 2006 14:36:42 +0900 (JST) Message-Id: <200609200536.k8K5agKO050954@shuttle.wide.toshiba.co.jp> Date: Wed, 20 Sep 2006 14:36:42 +0900 (JST) From: JINMEI Tatuya To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/103415: IPv6 packets arriving to stf are not accepted X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: JINMEI Tatuya List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2006 05:40:22 -0000 >Number: 103415 >Category: kern >Synopsis: IPv6 packets arriving to stf are not accepted >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 20 05:40:21 GMT 2006 >Closed-Date: >Last-Modified: >Originator: JINMEI Tatuya >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: KAME Project >Environment: System: FreeBSD impact.jinmei.org 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Wed Sep 20 01:43:54 JST 2006 jinmei@impact.jinmei.org:/local/usr.local/freebsd/src-6.1S/sys/i386/compile/GBDE i386 >Description: Recent FreeBSD kernels (6-STABLE and probably 5-STABLE also) fail to accept IPv6 packets assigned on an stf (6to4) interface of the receiving node. This is a (buggy) side-effect of a fix to netinet6/in6.c (rev. 1.61). With this fix the in6_ifaddr structure corresponding to the IPv6 address configured on the stf interface won't have the ifa_rtrequest function (since nd6_need_cache() returns false for the interface). As a side-effect that was not expected at that time, the loopback route to the configured address generated via in6_ifaddloop() is not installed properly. ip6_input() requires the loopback route to accept incoming packets to the receiving node, so this change caused the problem reported here. >How-To-Repeat: # ifconfig stf0 create # ifconfig stf0 inet6 2002:c000:0201::1 prefixlen 16 % ping6 2002:c000:0201::1 And you'll notice the ping6 doesn't receive the echo-replies. netstat -s -p ip6 should indicate the echo-requests are dropped in ip6_input(). >Fix: Apply the patch below. Index: in6.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/in6.c,v retrieving revision 1.51.2.9 diff -u -r1.51.2.9 in6.c --- in6.c 17 Jun 2006 17:58:33 -0000 1.51.2.9 +++ in6.c 20 Sep 2006 05:35:05 -0000 @@ -1720,8 +1720,12 @@ /* we could do in(6)_socktrim here, but just omit it at this moment. */ - if (newhost && nd6_need_cache(ifp) != 0) { - /* set the rtrequest function to create llinfo */ + if (newhost) { + /* + * set the rtrequest function to create llinfo. It also + * adjust outgoing interface of the route for the local + * address when called via in6_ifaddloop() below. + */ ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; } >Release-Note: >Audit-Trail: >Unformatted: