From owner-freebsd-net@FreeBSD.ORG Tue Jan 13 21:14:05 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 1D5173E2 for ; Tue, 13 Jan 2015 21:14:05 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E85B3CF3 for ; Tue, 13 Jan 2015 21:14:04 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3A8A2B945; Tue, 13 Jan 2015 16:14:03 -0500 (EST) Message-ID: <54B58A98.1020402@FreeBSD.org> Date: Tue, 13 Jan 2015 16:14:00 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Mike Tancsa , Paul Thornton , 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 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 13 Jan 2015 16:14:03 -0500 (EST) 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: Tue, 13 Jan 2015 21:14:05 -0000 On 1/3/15 1:06 PM, Mike Tancsa wrote: > On 1/3/2015 9:19 AM, Paul Thornton wrote: >> Hi, >> >> I can also replicate this behaviour on 10.1-RELEASE by simply creating >> an additional vlan interface. It affects IPv4 and IPv6 forwarding. > > Strange, I dont see that on RELENG_10 > > 0{marble}# ifconfig em2 up > 0{marble}# ifconfig em2.3 create 1.1.1.2/24 > 0{marble}# sysctl -a | grep forwarding > net.inet.ip.forwarding: 1 > net.inet.ip.fastforwarding: 0 > net.inet6.ip6.forwarding: 0 > 0{marble}# ifconfig vlan4 create 2.2.2.2 vlan 4 vlandev em2 > 0{marble}# sysctl -a | grep forwarding > net.inet.ip.forwarding: 1 > net.inet.ip.fastforwarding: 0 > net.inet6.ip6.forwarding: 0 > 0{marble}# > > 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 ? Yes, devd is running /etc/rc.d/netif start which probably checks gateway_enable and sets the sysctl based on that overriding what it in sysctl.conf. Just set gateway_enable=YES in rc.conf instead. -- John Baldwin