mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
network/route-nexthop: always reset gateway address when _dhcp or friends is specified to Gateway=
Just for safety.
This commit is contained in:
parent
4207f6c05d
commit
ffad01c81e
@ -62,20 +62,24 @@ int config_parse_gateway(
|
||||
|
||||
if (streq(rvalue, "_dhcp")) {
|
||||
route->gateway_from_dhcp_or_ra = true;
|
||||
route->gw_family = AF_UNSPEC;
|
||||
route->gw = IN_ADDR_NULL;
|
||||
TAKE_PTR(route);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (streq(rvalue, "_dhcp4")) {
|
||||
route->gw_family = AF_INET;
|
||||
route->gateway_from_dhcp_or_ra = true;
|
||||
route->gw_family = AF_INET;
|
||||
route->gw = IN_ADDR_NULL;
|
||||
TAKE_PTR(route);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (streq(rvalue, "_ipv6ra")) {
|
||||
route->gw_family = AF_INET6;
|
||||
route->gateway_from_dhcp_or_ra = true;
|
||||
route->gw_family = AF_INET6;
|
||||
route->gw = IN_ADDR_NULL;
|
||||
TAKE_PTR(route);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user