mirror of
https://github.com/systemd/systemd.git
synced 2025-02-09 13:57:42 +03:00
network/neighbor: drop IPv6 settings when the kernel does not support IPv6
This commit is contained in:
parent
754252f923
commit
4d4d7910d9
@ -560,6 +560,13 @@ static int neighbor_section_verify(Neighbor *neighbor) {
|
||||
"Ignoring [Neighbor] section from line %u.",
|
||||
neighbor->section->filename, neighbor->section->line);
|
||||
|
||||
if (neighbor->family == AF_INET6 && !socket_ipv6_is_supported())
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: Neighbor section with an IPv6 destination address configured, "
|
||||
"but the kernel does not support IPv6. "
|
||||
"Ignoring [Neighbor] section from line %u.",
|
||||
neighbor->section->filename, neighbor->section->line);
|
||||
|
||||
if (neighbor->ll_addr.length == 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"%s: Neighbor section without LinkLayerAddress= configured. "
|
||||
|
Loading…
x
Reference in New Issue
Block a user