summaryrefslogtreecommitdiff
path: root/src/network/networkd-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-13 12:49:15 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-13 13:02:50 +0100
commit765afd5c4dbc71940d6dd6007ecc3eaa5a0b2aa1 (patch)
treef3572c54479d2c8cfa15b1fdded1b48225b12f13 /src/network/networkd-util.c
parentd68e2e59b3103a2dd197401357dc619efa6e26db (diff)
networkd: stop managing per-interface IP forwarding settings
As it turns out the kernel does not support per-interface IPv6 packet forwarding controls (unlike as it does for IPv4), but only supports a global option (#1597). Also, the current per-interface management of the setting isn't really useful, as you want it to propagate to at least one more interface than the one you configure it on. This created much grief (#1411, #1808). Hence, let's roll this logic back and simplify this again, so that we can expose the same behaviour on IPv4 and IPv6 and things start to work automatically again for most folks: if a network with this setting set is set up we propagate the setting into the global setting, but this is strictly one-way: we never reset it again, and we do nothing for network interfaces where this setting is not enabled. Fixes: #1808, #1597.
Diffstat (limited to 'src/network/networkd-util.c')
-rw-r--r--src/network/networkd-util.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/network/networkd-util.c b/src/network/networkd-util.c
index df091393f6..2545621a93 100644
--- a/src/network/networkd-util.c
+++ b/src/network/networkd-util.c
@@ -79,10 +79,18 @@ int config_parse_address_family_boolean_with_kernel(
assert(rvalue);
assert(data);
+ /* This function is mostly obsolete now. It simply redirects
+ * "kernel" to "no". In older networkd versions we used to
+ * distuingish IPForward=off from IPForward=kernel, where the
+ * former would explicitly turn off forwarding while the
+ * latter would simply not touch the setting. But that logic
+ * is gone, hence silently accept the old setting, but turn it
+ * to "no". */
+
s = address_family_boolean_from_string(rvalue);
if (s < 0) {
if (streq(rvalue, "kernel"))
- s = _ADDRESS_FAMILY_BOOLEAN_INVALID;
+ s = ADDRESS_FAMILY_NO;
else {
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse IPForward= option, ignoring: %s", rvalue);
return 0;