]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: Log error if LLDP fails to start/stop
authorSusant Sahani <ssahani@gmail.com>
Thu, 9 May 2019 18:24:29 +0000 (23:54 +0530)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 9 May 2019 22:01:01 +0000 (00:01 +0200)
Now LLDP does not log anything why it failed which
is hard to debug. Let's just add some logs.

https://github.com/systemd/systemd/issues/10881

src/network/networkd-link.c

index 4db9f3f980ff4d46a025956f1ccb091dcf3c4cb1..f13fcb7b6e67fa31d9cb2d173d4d59e4ebff7c46 100644 (file)
@@ -3027,10 +3027,14 @@ static int link_update_lldp(Link *link) {
                 r = sd_lldp_start(link->lldp);
                 if (r > 0)
                         log_link_debug(link, "Started LLDP.");
+                else
+                        log_link_warning_errno(link, r, "Failed to start LLDP: %m");
         } else {
                 r = sd_lldp_stop(link->lldp);
                 if (r > 0)
                         log_link_debug(link, "Stopped LLDP.");
+                else
+                        log_link_warning_errno(link, r, "Failed to stop LLDP: %m");
         }
 
         return r;