]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: turn on LLDP reception by default, in "routers-only" mode
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Feb 2016 18:59:32 +0000 (19:59 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 21 Feb 2016 19:40:57 +0000 (20:40 +0100)
This way "networkctl status" becomes a bit more useful by default, as router
information is just visible, without any further configuration.

LLDP reception is fully passive and relatively low simple and low traffic,
hence this should be safe to enable by default.

man/systemd.network.xml
src/network/networkd-network.c

index 2de2a550dba343a754bc26d0acf2acf98f86e427..bbdcace5632f767945d602307731dc2b19b28734 100644 (file)
             <literal>routers-only</literal>. When true, incoming LLDP packets are accepted and a database of all LLDP
             neighbors maintained. If <literal>routers-only</literal> is set only LLDP data of various types of routers
             is collected and LLDP data about other types of devices ignored (such as stations, telephones and
-            others). If false, LLDP reception is disabled. Defaults to <literal>false</literal>. Use
+            others). If false, LLDP reception is disabled. Defaults to <literal>routers-only</literal>. Use
             <citerefentry><refentrytitle>networkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to query the
             collected neighbor data.
             </para>
index a6512d26e5ec2d2c03355d533557460c6d8f9237..935042260bfe9fbc4def6dc59147c88ea193a783 100644 (file)
@@ -119,6 +119,8 @@ static int network_load_one(Manager *manager, const char *filename) {
         network->allow_port_to_be_root = true;
         network->unicast_flood = true;
 
+        network->lldp_mode = LLDP_MODE_ROUTERS_ONLY;
+
         network->llmnr = RESOLVE_SUPPORT_YES;
         network->mdns = RESOLVE_SUPPORT_NO;
         network->dnssec_mode = _DNSSEC_MODE_INVALID;