diff options
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r-- | src/network/networkd-address.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 560605408f..28dcf14c6e 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -275,6 +275,13 @@ int config_parse_broadcast(const char *unit, if (r < 0) return r; + if (n->family == AF_INET6) { + log_syntax(unit, LOG_ERR, filename, line, EINVAL, + "Broadcast is not valid for IPv6 addresses, " + "ignoring assignment: %s", address); + return 0; + } + r = net_parse_inaddr(address, &n->family, &n->broadcast); if (r < 0) { log_syntax(unit, LOG_ERR, filename, line, EINVAL, |