summaryrefslogtreecommitdiff
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
parent7e95eda5b36f4a5259e1e86989b5aee824d83d03 (diff)
man: minor fixes to networkd page
Also enforce that we don't allow setting the Broadcast for IPv6 addresses.
-rw-r--r--man/systemd-networkd.service.xml27
-rw-r--r--src/network/networkd-address.c7
2 files changed, 28 insertions, 6 deletions
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.</para>
+ <para>To configure low-level link settings independently of
+ networks, see
+ <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ .</para>
+
<para>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.</para>
</refsect1>
@@ -105,14 +110,15 @@
<varlistentry>
<term><varname>Kind</varname></term>
<listitem>
- <para>The netdev kind. Currently, <literal>bridge</literal>, <literal>bond</literal> and <literal>vlan</literal>
+ <para>The netdev kind. Currently, <literal>bridge</literal>,
+ <literal>bond</literal> and <literal>vlan</literal>
are supported. This option is compulsory.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The <literal>[VLAN]</literal> section only applies for netdevs of kind <literal>vlan</literal>,
- and accepts the following keys:</para>
+ and accepts the following key:</para>
<variablelist class='network-directives'>
<varlistentry>
@@ -252,6 +258,15 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term><varname>Broadcast</varname></term>
+ <listitem>
+ <para>The broadcast address, which must be in the format described in
+ <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ . This key only applies to IPv4 addresses. If it is not given, it is
+ derived from the <literal>Address</literal> key.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><varname>Label</varname></term>
<listitem>
<para>An address label.</para>
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,