]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces: provide clearer messages about ethtool problems
authorVincent Bernat <vincent@bernat.ch>
Sat, 11 Aug 2018 17:43:20 +0000 (19:43 +0200)
committerVincent Bernat <vincent@bernat.ch>
Sat, 11 Aug 2018 17:43:20 +0000 (19:43 +0200)
Logs can confuse people on how important a problem is. Tell them
exactly what this would affect.

src/daemon/interfaces-linux.c

index 700626e3e3c0f5a385e0d06acd10666ccf7798ca..32aceb0e3525624a2d6f18cea7afa0a505df65b6 100644 (file)
@@ -300,7 +300,7 @@ iflinux_get_permanent_mac_ethtool(struct lldpd *cfg,
        if (ioctl(cfg->g_sock, SIOCETHTOOL, &ifr) == -1) {
                static int once = 0;
                if (errno == EPERM && !once) {
-                       log_warn("interfaces",
+                       log_warnx("interfaces",
                            "no permission to get permanent MAC address for %s (requires 2.6.19+)",
                            iface->name);
                        once = 1;
@@ -498,9 +498,10 @@ iflinux_ethtool_glink(struct lldpd *cfg, const char *ifname, struct ethtool_link
                } else {
                        static int once = 0;
                        if (errno == EPERM && !once) {
-                               log_warn("interfaces",
+                               log_warnx("interfaces",
                                    "cannot get ethtool link information "
-                                   "with GLINKSETTINGS (requires 4.9+)");
+                                   "with GLINKSETTINGS (requires 4.9+). "
+                                   "25G+ speeds may be missing in MAC/PHY TLVs");
                                once = 1;
                        }
                        nwords = -1;
@@ -555,9 +556,10 @@ iflinux_ethtool_glink(struct lldpd *cfg, const char *ifname, struct ethtool_link
        } else {
                static int once = 0;
                if (errno == EPERM && !once) {
-                       log_warn("interfaces",
+                       log_warnx("interfaces",
                            "cannot get ethtool link information "
-                           "with GSET (requires 2.6.19+)");
+                           "with GSET (requires 2.6.19+). "
+                           "MAC/PHY TLV will be unavailable");
                        once = 1;
                }
        }