Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 08:29:36 -0800
From:      "Bruce A. Mah" <bmah@freebsd.org>
To:        freebsd-stable@freebsd.org, freebsd-net@freebsd.org
Cc:        jhay@freebsd.org, bmah@freebsd.org
Subject:   IPv6 over gif(4) broken in 6.2-RELEASE?
Message-ID:  <20070120162936.GA18104@tomcat.kitchenlab.org>

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

--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--



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