summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-02-18 15:48:30 +0100
committerTom Gundersen <teg@jklm.no>2014-02-18 15:50:45 +0100
commit482e2ac193be708d183bdf2d893eb72435eb1d28 (patch)
treecd5c0d9371a552cecb1435a79d4c457b5207ff79 /src/network/networkd-address.c
parent7e95eda5b36f4a5259e1e86989b5aee824d83d03 (diff)
man: minor fixes to networkd page
Also enforce that we don't allow setting the Broadcast for IPv6 addresses.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c7
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,