Date: Wed, 3 Sep 2003 01:21:26 +0100 (BST) From: Bruce M Simpson <bms@spc.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/56341: ifconfig(8) does not display tunnel endpoints for gre(4) Message-ID: <20030903002126.5DE6437@saboteur.dek.spc.org> Resent-Message-ID: <200309030030.h830UFqD069340@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 56341 >Category: bin >Synopsis: ifconfig(8) does not display tunnel endpoints for gre(4) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 02 17:30:14 PDT 2003 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030903002126.5DE6437>