mirror of
https://github.com/systemd/systemd.git
synced 2024-12-27 07:22:31 +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:
parent
0b20047244
commit
be7468f07a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user