networkd: Log error if LLDP fails to start/stop

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
This commit is contained in:
Susant Sahani
2019-05-10 00:01:01 +02:00
committed by Yu Watanabe
parent 274be39d14
commit 8185ca6c0a
+4
View 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;