From owner-freebsd-net@FreeBSD.ORG Sat Jan 3 18:57:11 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1614ABD3 for ; Sat, 3 Jan 2015 18:57:11 +0000 (UTC) Received: from smtp2.mail.clearhost.co.uk (smtp2.mail.clearhost.co.uk [IPv6:2001:1420::25:102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.mail.clearhost.co.uk", Issuer "RapidSSL CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D258338B2 for ; Sat, 3 Jan 2015 18:57:10 +0000 (UTC) Received: from [2001:1420:a:105:c62c:3ff:fe2f:bf] (port=62333 helo=parsnip.heronsbrook.org.uk) by smtp2.mail.clearhost.co.uk with esmtpa (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Y7Tso-0000PI-Dm; Sat, 03 Jan 2015 18:57:06 +0000 Message-ID: <54A83BBE.8000700@prt.org> Date: Sat, 03 Jan 2015 18:58:06 +0000 From: Paul Thornton User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Mike Tancsa , freebsd-net@freebsd.org Subject: Re: Issue with forwarding when creates new interface [was USB Tethering and forwarding] References: <1419680989.938234917.k6otv1bh@frv34.fwdcdn.com> <1420288398.485039365.so6mgquw@frv34.fwdcdn.com> <54A7FA6C.8030603@prt.org> <54A82FA0.3090704@sentex.net> In-Reply-To: <54A82FA0.3090704@sentex.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2015 18:57:11 -0000 Hi, On 03/01/2015 18:06, Mike Tancsa wrote: > do you set forwarding via just /etc/sysctl.conf or in /etc/rc.conf via > ipv6_gateway_enable and gateway_enable. I seem to recall some discussion > about there being a difference. Perhaps devd is calling something that > then fiddles with the setting ignoring whats in sysctl.conf ? That seems to be what is happening. In the earlier post, I was just setting the three sysctls in /etc/sysctl.conf - and observed that forwarding went away if an interface was added. Doing it by setting fastforwarding only in sysctl.conf, and setting both gateway_enables to yes in rc.conf fixes the problem: [root@test1 ~]# sysctl -a | grep forwarding net.inet.ip.forwarding: 1 net.inet.ip.fastforwarding: 1 net.inet6.ip6.forwarding: 1 [root@test1 ~]# ifconfig vlan1 create [root@test1 ~]# sysctl -a | grep forwarding net.inet.ip.forwarding: 1 net.inet.ip.fastforwarding: 1 net.inet6.ip6.forwarding: 1 That's quite ... odd, to sat the least. I can't see anything in devd.conf which would relate to a new interface being created, but that doesn't mean that there isn't some magic functionality in there. Paul.