From bms@spc.org Tue Sep 2 17:21:30 2003 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8487C16A4BF for ; Tue, 2 Sep 2003 17:21:30 -0700 (PDT) Received: from bigboy.spc.org (bigboy.spc.org [195.206.69.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75B9D43FF5 for ; Tue, 2 Sep 2003 17:21:29 -0700 (PDT) (envelope-from bms@spc.org) Received: from saboteur.dek.spc.org (unknown [81.3.72.68]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bigboy.spc.org (Postfix) with ESMTP id 975423183 for ; Wed, 3 Sep 2003 01:22:48 +0100 (BST) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 5DE6437; Wed, 3 Sep 2003 01:21:26 +0100 (BST) Message-Id: <20030903002126.5DE6437@saboteur.dek.spc.org> Date: Wed, 3 Sep 2003 01:21:26 +0100 (BST) From: Bruce M Simpson Reply-To: Bruce M Simpson To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: ifconfig(8) does not display tunnel endpoints for gre(4) X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 56341 >Category: bin >Synopsis: ifconfig(8) does not display tunnel endpoints for gre(4) >Confidential: no >Severity: non-critical >Priority: low >Responsible: bms >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 02 17:30:14 PDT 2003 >Closed-Date: Fri Nov 14 12:59:16 PST 2003 >Last-Modified: Fri Nov 14 12:59:16 PST 2003 >Originator: Bruce M Simpson >Release: FreeBSD 5.1-RELEASE i386 >Organization: >Environment: System: FreeBSD saboteur.dek.spc.org 5.1-RELEASE FreeBSD 5.1-RELEASE #4: Wed Aug 20 07:43:54 BST 2003 root@saboteur.dek.spc.org:/usr/src/sys/i386/compile/SABOTEUR i386 >Description: ifconfig(8) does NOT display the tunnel physical endpoints correctly for a GRE interface under certain conditions. >How-To-Repeat: When the system is compiled with INET6 support, then any instance of a tunnel clone interface must have an AF_INET6 address configured on it for the tunnel source/destination to be displayed. Run ifconfig -a with a configured gre interface in a world which has both options INET and options INET6 in the kernel and has been built in sync with such a kernel. The notion of a tunnel interface having more than one address family is a bit silly (possible, by any means, but it screws up the behaviour of the SIOCGIFPSRCADDR ioctls. >Fix: Patching the gre driver to return an empty address in the case of IPV6 will NOT work. this is an ifconfig bug. basically the ifconfig tunnel_status code tries to be too smart for its own good. it asks for an AF_INET6 datagram socket. this always succeeds when INET6 is enabled and active in the system. The lame fix is to always return an AF_INET address even for the IN6 suffixed ifioctls, in a tunnel driver which doesn't support INET6 payloads. This is not the way to fix the problem, though, as it relies on ifconfig making the assumption that all tunnel drivers in the system support SIOCGIFPSRCADDR_IN6 et al even if ip6 makes no sense for the given encapsulation. It also requires that an INET6 define be visible if the module is compiled in its own module directory. The behaviour of ifconfig(8) is attributable to the KAME import; the other tunnel clonable drivers in the system are KAME derived and for these other drivers, ifconfig(8) behaves correctly. >Release-Note: >Audit-Trail: State-Changed-From-To: open->analyzed State-Changed-By: bms State-Changed-When: Sun 28 Sep 2003 17:16:08 PDT State-Changed-Why: I'm aware of the problem and will commit a fix eventually. Responsible-Changed-From-To: freebsd-bugs->bms Responsible-Changed-By: bms Responsible-Changed-When: Sun 28 Sep 2003 17:16:08 PDT Responsible-Changed-Why: I'm aware of the problem and will commit a fix eventually. http://www.freebsd.org/cgi/query-pr.cgi?pr=56341 State-Changed-From-To: analyzed->closed State-Changed-By: bms State-Changed-When: Fri 14 Nov 2003 12:58:28 PST State-Changed-Why: I committed a fix for this in gre(4) to avoid ripping apart ifconfig(8). I'm not completely happy about fixing things this way, but it is the 'path of least resistance' whilst still making gre(4) useful for people. http://www.freebsd.org/cgi/query-pr.cgi?pr=56341 >Unformatted: