1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

LLDP: Fix logs for LLDP

```
May 10 11:08:54 test systemd-networkd[447]: wwan0: Failed to stop LLDP: Success
May 10 11:08:54 test systemd-networkd[447]: wwan0: Gained carrier
May 10 11:08:54 test systemd-networkd[447]: wwan0: Failed to start LLDP: Success
```
This commit is contained in:
Susant Sahani 2019-05-10 17:47:45 +05:30 committed by Yu Watanabe
parent 0b20047244
commit be7468f07a

View File

@ -3027,16 +3027,16 @@ static int link_update_lldp(Link *link) {
if (link->flags & IFF_UP) {
r = sd_lldp_start(link->lldp);
if (r < 0)
return log_link_warning_errno(link, r, "Failed to start LLDP: %m");
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)
return log_link_warning_errno(link, r, "Failed to stop LLDP: %m");
if (r > 0)
log_link_debug(link, "Stopped LLDP.");
else
log_link_warning_errno(link, r, "Failed to stop LLDP: %m");
}
return r;