network: introduce per-interface IP forwarding settings
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 20 Feb 2024 21:20:45 +0000 (06:20 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 22 Feb 2024 19:24:12 +0000 (19:24 +0000)
commit3976c430927e1bfefa0413f80ebac84ab9a64350
tree74dc60f375f8858f04c23cc62174ff9311b844c4
parent755fdfffa0061b35651cd85a3a5e902b336ec120
network: introduce per-interface IP forwarding settings

This deprecates IPForward= setting, which unconditionally controled
the global setting, even though it is a setting in .network file.

Instead, this introduces new IPv4Forwarding= and IPv6Forwarding=
settings both in .network and networkd.conf.
If these settings are specified in a .network file, then the
per-interface forwarding setting will be configured.
If specified in networkd.conf, then the global IP forwarding setting will
be configured.

Closes #30648.
24 files changed:
man/networkd.conf.xml
man/systemd.network.xml
src/network/networkd-gperf.gperf
src/network/networkd-lldp-tx.c
src/network/networkd-manager.c
src/network/networkd-manager.h
src/network/networkd-ndisc.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/network/networkd-route-nexthop.c
src/network/networkd-sysctl.c
src/network/networkd-sysctl.h
src/network/networkd-util.c
src/network/networkd-util.h
test/test-network/conf/25-agent-client-peer.network
test/test-network/conf/25-agent-client.network
test/test-network/conf/25-agent-server-peer.network
test/test-network/conf/25-agent-server.network
test/test-network/conf/25-ipv6-proxy-ndp.network
test/test-network/conf/25-sysctl.network
test/test-network/conf/26-bridge-vlan-master-issue-20373.network
test/test-network/conf/26-bridge-vlan-slave-issue-20373.network
test/test-network/systemd-networkd-tests.py