networkd: fix several Address entries in [Network] section

This commit is contained in:
Tom Gundersen 2013-11-28 17:17:04 +01:00
parent 2a16a986ce
commit 92fe133abf
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View 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;