Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2002 14:38:28 +0900
From:      JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= <jinmei@isl.rdc.toshiba.co.jp>
To:        Edwin Groothuis <edwin@mavetju.org>
Cc:        freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   Re: IPv6-over-IPv4 problems since the upgrade to 4.5
Message-ID:  <y7vbsecpzu3.wl@condor.jinmei.org>
In-Reply-To: <y7vk7t1pyoi.wl@condor.jinmei.org>
References:  <0D9185CE635BD511ACA50090277A6FCF1359DB@axcs18.cos.agilent.com> <20020216130842.A19081@energyhq.homeip.net> <20020217122510.D491@k7.mavetju.org> <y7v4rk9lobt.wl@condor.jinmei.org> <20020222234829.F492@k7.mavetju.org> <y7vit8pbmg8.wl@condor.jinmei.org> <20020223084616.G492@k7.mavetju.org> <y7vwux1q2e4.wl@condor.jinmei.org> <20020225221827.F491@k7.mavetju.org> <y7vk7t1pyoi.wl@condor.jinmei.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Finally I figured out the problem.

The essential reason for this weirdness was that the kernel did not
set the in_conninfo.inc_isipv6 member of a PCB entry correctly.  As a
result of this, once a cached route stored in the PCB has become
invalid, the kernel would try to get a new route with an AF_INET
destination.  Neighbor solicitation messages on the gif link, which
might invalidate the cached route, are also bogus, but they are not
directly related to this particular problem.

So, we should deal with this trouble as follows:

1. set the inc_isipv6 member correctly.  The patch attached to this
   message should work for this (I checked the patch on a 4.5 RELEASE
   box).
2. prohibit the kernel from sending the bogus neighbor solicitations.
   This can be done by a patch I proposed last week in a different thread:
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=345287+0+archive/2002/freebsd-net/20020224.freebsd-net

BTW: I believe we should not rely on the inc_isipv6 member, which
tends to introduce this type of bug.  We should probably detect the
correct family by the addresses themselves.

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					jinmei@isl.rdc.toshiba.co.jp

*** tcp_usrreq.c.orig	Tue Feb 26 14:00:22 2002
--- tcp_usrreq.c	Tue Feb 26 14:05:43 2002
***************
*** 375,380 ****
--- 375,381 ----
  	}
  	inp->inp_vflag &= ~INP_IPV4;
  	inp->inp_vflag |= INP_IPV6;
+ 	inp->inp_inc.inc_isipv6 = 1;
  	if ((error = tcp6_connect(tp, nam, p)) != 0)
  		goto out;
  	error = tcp_output(tp);
*** tcp_syncache.c.orig	Tue Feb 26 10:52:39 2002
--- tcp_syncache.c	Tue Feb 26 10:52:49 2002
***************
*** 552,557 ****
--- 552,558 ----
  	/*
  	 * Insert new socket into hash list.
  	 */
+ 	inp->inp_inc.inc_isipv6 = sc->sc_inc.inc_isipv6;
  #ifdef INET6
  	if (sc->sc_inc.inc_isipv6) {
  		inp->in6p_laddr = sc->sc_inc.inc6_laddr;

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




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