Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Jan 2015 18:58:06 +0000
From:      Paul Thornton <prt@prt.org>
To:        Mike Tancsa <mike@sentex.net>, freebsd-net@freebsd.org
Subject:   Re: Issue with forwarding when creates new interface [was USB Tethering and forwarding]
Message-ID:  <54A83BBE.8000700@prt.org>
In-Reply-To: <54A82FA0.3090704@sentex.net>
References:  <1419680989.938234917.k6otv1bh@frv34.fwdcdn.com> <1420288398.485039365.so6mgquw@frv34.fwdcdn.com> <54A7FA6C.8030603@prt.org> <54A82FA0.3090704@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54A83BBE.8000700>