From: Tom Gundersen Date: Tue, 18 Feb 2014 14:48:30 +0000 (+0100) Subject: man: minor fixes to networkd page X-Git-Tag: v209~60 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=482e2ac193be708d183bdf2d893eb72435eb1d28 man: minor fixes to networkd page Also enforce that we don't allow setting the Broadcast for IPv6 addresses. --- diff --git a/man/systemd-networkd.service.xml b/man/systemd-networkd.service.xml index 527742cea..9c7ca8343 100644 --- a/man/systemd-networkd.service.xml +++ b/man/systemd-networkd.service.xml @@ -61,11 +61,16 @@ network devices as they appear, as well as creating virtual network devices. + To configure low-level link settings independently of + networks, see + udev7 + . + Network configurations applied before networkd is started - are not removed, and configuration applied by networkd are not - removed when networkd exits. This ensures restarting networkd - does not cut the network connection, and, in particular, that - it is safe to transition between the initrd and the real root, + are not removed, and static configuration applied by networkd + are not removed when networkd exits. This ensures restarting + networkd does not cut the network connection, and, in particular, + that it is safe to transition between the initrd and the real root, and back. @@ -105,14 +110,15 @@ Kind - The netdev kind. Currently, bridge, bond and vlan + The netdev kind. Currently, bridge, + bond and vlan are supported. This option is compulsory. The [VLAN] section only applies for netdevs of kind vlan, - and accepts the following keys: + and accepts the following key: @@ -251,6 +257,15 @@ As in the [Network] section. This key is mandatory. + + Broadcast + + The broadcast address, which must be in the format described in + inet_pton3 + . This key only applies to IPv4 addresses. If it is not given, it is + derived from the Address key. + + Label diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 560605408..28dcf14c6 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,