network: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress=

Follow-up for #23927.
This commit is contained in:
Yu Watanabe
2022-07-15 03:37:09 +09:00
parent c1dd250f18
commit d3efcd2def
5 changed files with 24 additions and 18 deletions
+3 -2
View File
@@ -295,9 +295,10 @@ int config_parse_ipv4ll_address(
"Failed to parse %s=, ignoring assignment: %s", lvalue, rvalue);
return 0;
}
if (!in4_addr_is_link_local(&a.in)) {
if (!in4_addr_is_link_local_dynamic(&a.in)) {
log_syntax(unit, LOG_WARNING, filename, line, 0,
"Not a IPv4 link local address, ignoring assignment: %s", rvalue);
"Specified address cannot be used as an IPv4 link local address, ignoring assignment: %s",
rvalue);
return 0;
}