MPD PPTP seting 0 on net.inet.ip.forwarding

Eugene Grosbein egrosbein at rdtc.ru
Thu Oct 31 19:03:14 UTC 2013


On 01.11.2013 01:39, Raimundo Santos wrote:
> Ok, I have found some weird thing:
> 
> 
> On 31 October 2013 16:08, Raimundo Santos <raitech at gmail.com> wrote:
> 
>>
>>
>> As you can see, there is no gateway_enable="YES", but there is
>> net.inet.ip.forwarding=1 in /etc/sysctl.conf
>>
>>
> MPD do not respect my configuration in sysctl.conf, only the one in
> rc.conf. To test:
> 
> * put net.inet.ip.forwarding and net.inet6.ip6.forwarding = 1 in sysctl.conf
> * put gateway_enable="YES" in rc.conf
> * connect to PPTP server
> 
> You will see that net.inet.ip.forwarding, after PPTP connection are
> stablished, remains 1, but net.inet6.ip6.forwarding goes to 0!
> 
> Is that behaviour expected?
> 
> Am I worng when setting a router without gateway_enable="YES" in rc.conf
> but with net.inet.ip.forwarding=1 in sysctl.conf?

That's not MPD's fault. That's FreeBSD 9.2's devd starting
/etc/pccard_ether $subsystem start
every time an interface is created. This leads to start of
/etc/rc.d/netif quietstart $ifn

netif does LOTS of things making severe (and unneeded for mpd) load on the system
and resetting net.inet.ip.forwarding to 0 if you don't have gateway_enable="YES"
in your /etc/rc.conf

I don't need devd so I just disabled it in rc.conf with devd_enable="NO".
If you need it, just switch from sysctls to:

gateway_enable="YES"
ipv6_gateway_enable="YES"

This seems as regression from 9.1 behavior for me for busy mpd-based BRAS'es
as performance of the box drops significantly due to extra work performed
by devd and its scripts.





More information about the freebsd-net mailing list