From owner-freebsd-net@FreeBSD.ORG Sat Jan 20 16:29:37 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02CBA16A401; Sat, 20 Jan 2007 16:29:37 +0000 (UTC) (envelope-from bmah@freebsd.org) Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by mx1.freebsd.org (Postfix) with ESMTP id DC82313C428; Sat, 20 Jan 2007 16:29:36 +0000 (UTC) (envelope-from bmah@freebsd.org) Received: from tomcat.kitchenlab.org (tomcat.kitchenlab.org [64.142.31.107]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l0KGTar6005017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Jan 2007 08:29:36 -0800 Received: from tomcat.kitchenlab.org (localhost.kitchenlab.org [127.0.0.1]) by tomcat.kitchenlab.org (8.13.8/8.13.8) with ESMTP id l0KGTaGq018117; Sat, 20 Jan 2007 08:29:36 -0800 (PST) (envelope-from bmah@freebsd.org) Received: (from bmah@localhost) by tomcat.kitchenlab.org (8.13.8/8.13.8/Submit) id l0KGTa2u018116; Sat, 20 Jan 2007 08:29:36 -0800 (PST) (envelope-from bmah@freebsd.org) X-Authentication-Warning: tomcat.kitchenlab.org: bmah set sender to bmah@freebsd.org using -f Date: Sat, 20 Jan 2007 08:29:36 -0800 From: "Bruce A. Mah" To: freebsd-stable@freebsd.org, freebsd-net@freebsd.org Message-ID: <20070120162936.GA18104@tomcat.kitchenlab.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Cc: jhay@freebsd.org, bmah@freebsd.org Subject: IPv6 over gif(4) broken in 6.2-RELEASE? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2007 16:29:37 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm observing a problem with IPv6 over gif(4) tunnels on 6.2-RELEASE and recent 6-STABLE, namely that I can't seem to be able to pass traffic over them. Essentially, when I configure a gif interface like this: # ifconfig gif0 inet6 aaaa:bbbb:cccc:dddd::1 aaaa:bbbb:cccc:dddd::2 prefixl= en 128 the interface should add a host route to aaaa:bbbb:cccc:dddd::2 through gif0. This is necessary to be able to pass traffic over the tunnel, particularly since the source and destination addresses of the link don't need to have any relationship to each other. However, this route doesn't get installed on recent 6-STABLE. Therefore there is no way to get an IPv6 packet to the other end of the tunnel because there's no route for the destination. The most obvious symptom is that I try to ping the other tunnel endpoint and get: ping6: UDP connect: No route to host I know this worked on RELENG_6 as of June 2006; my home firewall has been running this code for months without a hitch. It doesn't work in 6.2-RC2 or 6.2-RELEASE (fresh CD installs on i386, GENERIC kernels), or this week's RELENG_6 (nanobsd on i386). I somewhat suspect revs. 1.48.2.15 and 1.48.2.14 to src/sys/netinet/nd6.c. If I locally revert these two changes (see diff below), IPv6 over gif(4) works again. There's another workaround for people stuck in this situation and who aren't in a position to try this diff. That is to manually install the host route like this: # route add -host -inet6 aaaa:bbbb:cccc:dddd::2 -interface gif0 -nostatic -= llinfo Comments? Bruce. Index: nd6.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/netinet6/nd6.c,v retrieving revision 1.48.2.16 diff -u -r1.48.2.16 nd6.c --- nd6.c 29 Nov 2006 14:00:29 -0000 1.48.2.16 +++ nd6.c 20 Jan 2007 16:15:28 -0000 @@ -1316,7 +1316,7 @@ callout_init(&ln->ln_timer_ch, 0); =20 /* this is required for "ndp" command. - shin */ - if (req =3D=3D RTM_ADD && (rt->rt_flags & RTF_STATIC)) { + if (req =3D=3D RTM_ADD) { /* * gate should have some valid AF_LINK entry, * and ln->ln_expire should have some lifetime --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFskNu2MoxcVugUsMRAkWFAKDjjSFOSFxmHHAI86l/EJtpCTuTxgCg7zBs Tfqe3SLBrdpKVKw0qwjTuRE= =Mbvj -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--