Revert "networkd: create "kernel" setting for IPForwarding"
authorLennart Poettering <lennart@poettering.net>
Mon, 8 Jun 2015 21:24:32 +0000 (23:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 8 Jun 2015 21:24:32 +0000 (23:24 +0200)
man/systemd.network.xml
src/network/networkd-link.c
src/network/networkd-manager.c
src/network/networkd.h

index 54fef4c..bd061c2 100644 (file)
           the routing table. Takes either a boolean argument, or the
           values <literal>ipv4</literal> or <literal>ipv6</literal>,
           which only enables IP forwarding for the specified address
-          family, or <literal>kernel</literal>, which preserves existing sysctl settings.
-          This controls the
+          family. This controls the
           <filename>net.ipv4.conf.&lt;interface&gt;.forwarding</filename>
           and
           <filename>net.ipv6.conf.&lt;interface&gt;.forwarding</filename>
           for details about sysctl options). Defaults to
           <literal>no</literal>.</para>
 
-         <para>Note: unless this option is turned on, or set to <literal>kernel</literal>,
-          no IP forwarding is done on this interface, even if this is
+          <para>Note: unless this option is turned on, no IP
+          forwarding is done on this interface, even if this is
           globally turned on in the kernel, with the
           <filename>net.ipv4.ip_forward</filename> and
           <filename>net.ipv4.ip_forward</filename> sysctl
index b30fd7a..f039a2d 100644 (file)
@@ -1481,9 +1481,6 @@ static int link_set_ipv4_forward(Link *link) {
         const char *p = NULL;
         int r;
 
-        if (link->network->ip_forward == ADDRESS_FAMILY_KERNEL)
-                return 0;
-
         p = strjoina("/proc/sys/net/ipv4/conf/", link->ifname, "/forwarding");
         r = write_string_file_no_create(p, one_zero(link_ipv4_forward_enabled(link)));
         if (r < 0)
@@ -1500,9 +1497,6 @@ static int link_set_ipv6_forward(Link *link) {
         if (!socket_ipv6_is_supported())
                 return 0;
 
-        if (link->network->ip_forward == ADDRESS_FAMILY_KERNEL)
-                return 0;
-
         p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/forwarding");
         r = write_string_file_no_create(p, one_zero(link_ipv6_forward_enabled(link)));
         if (r < 0)
index 2cc53df..db737ad 100644 (file)
@@ -853,8 +853,6 @@ const char *address_family_boolean_to_string(AddressFamilyBoolean b) {
                 return "ipv4";
         if (b == ADDRESS_FAMILY_IPV6)
                 return "ipv6";
-        if (b == ADDRESS_FAMILY_KERNEL)
-                return "kernel";
 
         return NULL;
 }
@@ -874,8 +872,6 @@ AddressFamilyBoolean address_family_boolean_from_string(const char *s) {
                 return ADDRESS_FAMILY_IPV4;
         if (streq(s, "ipv6"))
                 return ADDRESS_FAMILY_IPV6;
-        if (streq(s, "kernel"))
-                return ADDRESS_FAMILY_KERNEL;
 
         return _ADDRESS_FAMILY_BOOLEAN_INVALID;
 }
index 49afeff..4b13d4a 100644 (file)
@@ -60,7 +60,6 @@ typedef enum AddressFamilyBoolean {
         ADDRESS_FAMILY_IPV4 = 1,
         ADDRESS_FAMILY_IPV6 = 2,
         ADDRESS_FAMILY_YES = 3,
-        ADDRESS_FAMILY_KERNEL = 4,
         _ADDRESS_FAMILY_BOOLEAN_MAX,
         _ADDRESS_FAMILY_BOOLEAN_INVALID = -1,
 } AddressFamilyBoolean;