chiark / gitweb /
networkd: fix several Address entries in [Network] section
[elogind.git] / src / network / networkd-route.c
index b88c622614f0458147ad9f26fe6fc509816eadae..1ea6237cc7e03f15eca7b639c3207d89e1c71997 100644 (file)
@@ -118,8 +118,6 @@ int route_configure(Route *route, Link *link,
                 return r;
         }
 
-        link->rtnl_messages ++;
-
         return 0;
 }
 
@@ -144,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;