Page MenuHomeDevCentral

Reconfigure packet forwarding for router-001
ClosedPublic

Authored by dereckson on Jan 26 2023, 17:24.
Tags
None
Referenced Files
F52625462: D2757.id6999.diff
Sat, Oct 3, 16:08
F52617980: D2757.diff
Sat, Oct 3, 15:06
Unknown Object (File)
Thu, Oct 1, 06:26
Unknown Object (File)
Sun, Sep 27, 22:03
Unknown Object (File)
Sat, Sep 26, 13:40
Unknown Object (File)
Sat, Sep 26, 10:52
Unknown Object (File)
Sat, Sep 26, 10:51
Unknown Object (File)
Sat, Sep 26, 06:27
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 Passed
Unit
No Test Coverage
Branch
router-rc
Build Status
Buildable 4361
Build 4628: arc lint + arc unit

Event Timeline

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