summaryrefslogtreecommitdiff
path: root/src/network/networkd-network-gperf.gperf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-13 13:47:08 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-13 13:55:15 +0100
commit5a8bcb674f71a20e95df55319b34c556638378ce (patch)
treedb1de9b03cb9bf4c017a0f620cf9d310c9de6098 /src/network/networkd-network-gperf.gperf
parent76917807eb50ccde58901e8bec7ed3d408d1cc22 (diff)
networkd: add minimal IP forwarding and masquerading support to .network files
This adds two new settings to networkd's .network files: IPForwarding=yes and IPMasquerade=yes. The former controls the "forwarding" sysctl setting of the interface, thus controlling whether IP forwarding shall be enabled on the specific interface. The latter controls whether a firewall rule shall be installed that exposes traffic coming from the interface as coming from the local host to all other interfaces. This also enables both options by default for container network interfaces, thus making "systemd-nspawn --network-veth" have network connectivity out of the box.
Diffstat (limited to 'src/network/networkd-network-gperf.gperf')
-rw-r--r--src/network/networkd-network-gperf.gperf2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 5094b488f3..3eb37b4d24 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -44,6 +44,8 @@ Network.Domains, config_parse_domains, 0,
Network.DNS, config_parse_strv, 0, offsetof(Network, dns)
Network.LLMNR, config_parse_llmnr, 0, offsetof(Network, llmnr)
Network.NTP, config_parse_strv, 0, offsetof(Network, ntp)
+Network.IPForward, config_parse_bool, 0, offsetof(Network, ip_forward)
+Network.IPMasquerade, config_parse_bool, 0, offsetof(Network, ip_masquerade)
Address.Address, config_parse_address, 0, 0
Address.Peer, config_parse_address, 0, 0
Address.Broadcast, config_parse_broadcast, 0, 0