chiark / gitweb /
networkd: fix several Address entries in [Network] section
[elogind.git] / src / network / networkd-route.c
index 1166a99a79613fc6c5d348407fa8adac9bf7f0e8..1ea6237cc7e03f15eca7b639c3207d89e1c71997 100644 (file)
@@ -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;