Page MenuHomeDevCentral

Reconfigure packet forwarding for router-001
ClosedPublic

Authored by dereckson on Jan 26 2023, 17:24.
Tags
None
Referenced Files
F2964896: D2757.diff
Sun, May 19, 00:18
F2964225: D2757.id6999.diff
Sat, May 18, 22:12
F2957276: D2757.diff
Sat, May 18, 02:53
Unknown Object (File)
Tue, May 14, 00:43
Unknown Object (File)
Mon, May 13, 01:36
Unknown Object (File)
Sun, May 12, 19:01
Unknown Object (File)
Thu, May 9, 15:50
Unknown Object (File)
Wed, May 8, 11:17
Subscribers
None

Details

Summary

On reboot, the routing service overwrites net.inet.ip.forwarding, so the value
in /etc/sysctl.conf isn't relevant.

Here the relevant code from /etc/rc.d/routing on FreeBSD 13.1p5:

if checkyesno gateway_enable; then
    ropts_init inet
    echo -n ' gateway=YES'
    ${SYSCTL} net.inet.ip.forwarding=1 > /dev/null
else
    ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null
fi

So, as documented in the handbook, the expected configuration
is by setting the gateway_enable variable.

This change partially reverts 6deb32e01378 / D2596.

Test Plan

/etc/rc.d/routing restart

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Jan 26 2023, 17:25