From owner-freebsd-net@FreeBSD.ORG Tue Oct 10 16:49:36 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E030116A403 for ; Tue, 10 Oct 2006 16:49:36 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CC4C43D58 for ; Tue, 10 Oct 2006 16:49:34 +0000 (GMT) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 61C6D33CAA; Tue, 10 Oct 2006 18:49:32 +0200 (SAST) Date: Tue, 10 Oct 2006 18:49:32 +0200 From: John Hay To: freebsd-net@freebsd.org Message-ID: <20061010164932.GB87412@zibbi.meraka.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: ifconfig tunnel and /etc/network.subr mismatch 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: Tue, 10 Oct 2006 16:49:37 -0000 Hi, While trying to configure a IPv4-over-IPv6 tunnel, I found that the old way of "ifconfig gif0 tunnel inet6 " does not work anymore. It gives an unhelpful error message: ###### ifconfig gif0 tunnel fd9c:6829:597c::1 fd9c:6829:597c:9:2c0:dfff:fef7:82eb ifconfig: SIOCSIFPHYADDR: Address family not supported by protocol family ###### You have to swap inet6 and tunnel, so it should look like this "ifconfig gif0 inet6 tunnel " The problem with that is that you cannot do that with the current /etc/network.subr and rc.conf scripts because /etc/network.subr do it this way: ###### ifconfig $i create >/dev/null 2>&1 ifconfig $i tunnel ${peers} ifconfig $i up ###### The printfs in ifconfig also still show that one can have the "tunnel inet6" syntax: ###### grep tunnel * | grep printf af_inet.c: printf("\ttunnel inet %s --> %s\n", src, dst); af_inet6.c: printf("\ttunnel inet6 %s --> %s\n", src, dst); ###### PR 97014 also mentioned the problem. So what should we do? Should ifconfig be fixed or should network.subr be fixed? John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org