mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
network: assume Scope=host when Address= is loopback address
Fixes #14903.
This commit is contained in:
parent
96100b8a04
commit
07336a0672
@ -1053,6 +1053,7 @@ int config_parse_address_scope(const char *unit,
|
||||
}
|
||||
}
|
||||
|
||||
n->scope_set = true;
|
||||
n = NULL;
|
||||
return 0;
|
||||
}
|
||||
@ -1125,5 +1126,8 @@ int address_section_verify(Address *address) {
|
||||
address->section->filename, address->section->line);
|
||||
}
|
||||
|
||||
if (!address->scope_set && in_addr_is_localhost(address->family, &address->in_addr) > 0)
|
||||
address->scope = RT_SCOPE_HOST;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ struct Address {
|
||||
union in_addr_union in_addr;
|
||||
union in_addr_union in_addr_peer;
|
||||
|
||||
bool scope_set:1;
|
||||
bool ip_masquerade_done:1;
|
||||
bool manage_temporary_address:1;
|
||||
bool home_address:1;
|
||||
|
Loading…
Reference in New Issue
Block a user