chiark / gitweb /
networkd: propagate IPFoward= per-interface setting also to /proc/sys/net/ipv4/ip_forward
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Jan 2015 19:50:46 +0000 (20:50 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Jan 2015 19:55:13 +0000 (20:55 +0100)
commit43c6d5abacaebf813845934ec8d5e5ee3c431854
treeac0e44a65ea82b254c6ce2e311583ecfea798c62
parentcd1ddd542136c49831fa34de49321153dcc291e2
networkd: propagate IPFoward= per-interface setting also to /proc/sys/net/ipv4/ip_forward

We need to turn on /proc/sys/net/ipv4/ip_forward before the
per-interface forwarding setting is useful, hence let's propagate the
per-interface setting once to the system-wide setting.

Due to the unclear ownership rules of that flag, and the fact that
turning it on also has effects on other sysctl flags we try to minimize
changes to the flag, and only turn it on once. There's no logic to
turning it off again, but this should be fairly unproblematic as the
per-interface setting defaults to off anyway.
src/network/networkd-link.c