From owner-freebsd-net@FreeBSD.ORG Mon Oct 3 21:33:19 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F76D1065672 for ; Mon, 3 Oct 2011 21:33:19 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 67CD78FC14 for ; Mon, 3 Oct 2011 21:33:19 +0000 (UTC) Received: from PWSVL-EXCHTS-02.internal.cacheflow.com (sai-rp.bluecoat.com [10.2.2.126] (may be forged)) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id p93LXISc029937 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 3 Oct 2011 14:33:18 -0700 (PDT) Received: from PWSVL-EXCMBX-01.internal.cacheflow.com ([fe80::15bc:12e2:4676:340f]) by PWSVL-EXCHTS-02.internal.cacheflow.com ([fe80::4910:317f:407:6ecc%14]) with mapi id 14.01.0289.001; Mon, 3 Oct 2011 14:33:13 -0700 From: "Li, Qing" To: Matt Smith Thread-Topic: gif interface not passing IPv6 packets Thread-Index: AQHMgg8yZV0c+F5nhEi3jhFEMbgUgJVrHidg Date: Mon, 3 Oct 2011 21:33:13 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.2.2.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-net@freebsd.org" Subject: RE: gif interface not passing IPv6 packets 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: Mon, 03 Oct 2011 21:33:19 -0000 >=20 > Just to let you know that I was doing a lot of testing off of the > mailing list with Hiroki Sato and we basically discovered that I was > missing an alias on my lo0 interface. He first advised me to try > testing with adding a /126 to gif0 rather than a /128 which worked > successfully. Then he advised me to go back to the original > configuration but also run ifconfig lo0 2a01:348:6:45c::2/128 alias > which added the correct routes and resolved the problem. Whilst this > is a workaround it obviously doesn't resolve the actual root cause so > thank you if you come up with a patch. >=20 You don't need any aliases to make this configuration work.=20 Adding the interface alias triggers the code that installs the=20 proper routing entry for the local end of the gif tunnel. The suggested workaround (wrt configuring aliases and lo0 manipulation) is no different from doing the following: ifconfig gif create ifconfig gif0 inet6 -ifdisabled 2a01:348:6:45c::2 ifconfig gif0 inet6 2a01:348:6:45c::2 2a01:348:6:45c::1 > > I'm still really confused though why it worked before my power failure > and failed afterwards when as far as I'm aware nothing has changed on > the system. >=20 > I'll await the patch and test it out when you post it. > The root cause is in the use of "IFA_ROUTE" and "IFA_RTSELF" flags. For any IFF_POINTOPOINT interface, the IFA_ROUTE is an indication both end of the tunnel has been specified and the proper route has been installed. IFA_RTSELF is a flag that indicates a route over the lo0 interface=20 has been appropriated for the interface address.=20 Please give the following patch a try and let me know how it works out for you. http://people.freebsd.org/~qingli/in6.c.diff --Qing