[systemd-commits] src/network

Tom Gundersen tomegun at kemper.freedesktop.org
Thu Nov 28 08:14:27 PST 2013


 src/network/networkd-address.c |    6 ++++++
 src/network/networkd-route.c   |    6 ++++++
 2 files changed, 12 insertions(+)

New commits:
commit 92fe133abf2de889659464ae8affd1db1710f72e
Author: Tom Gundersen <teg at jklm.no>
Date:   Thu Nov 28 17:17:04 2013 +0100

    networkd: fix several Address entries in [Network] section

diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 0555d31..8f16a8c 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -155,6 +155,12 @@ int config_parse_address(const char *unit,
         assert(rvalue);
         assert(data);
 
+        if (streq(section, "Network")) {
+                /* we are not in an Address section, so treat
+                 * this as the special '0' section */
+                section_line = 0;
+        }
+
         r = address_new(network, section_line, &n);
         if (r < 0)
                 return r;
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 1166a99..1ea6237 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -142,6 +142,12 @@ int config_parse_gateway(const char *unit,
         assert(rvalue);
         assert(data);
 
+        if (streq(section, "Network")) {
+                /* we are not in an Route section, so treat
+                 * this as the special '0' section */
+                section_line = 0;
+        }
+
         r = route_new(network, section_line, &n);
         if (r < 0)
                 return r;



More information about the systemd-commits mailing list