mirror of
https://github.com/systemd/systemd.git
synced 2025-02-28 05:57:33 +03:00
networkd: fix several Address entries in [Network] section
This commit is contained in:
parent
2a16a986ce
commit
92fe133abf
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user