From ed52cce33f588bbeb3d7f5d7f5e76a85cf6e4f89 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 30 Apr 2021 07:00:45 +0900 Subject: [PATCH] network: can: do not warn if link does not exist anymore --- src/network/networkd-can.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/network/networkd-can.c b/src/network/networkd-can.c index 2ab8d32812c..8e4cd21c6f1 100644 --- a/src/network/networkd-can.c +++ b/src/network/networkd-can.c @@ -57,14 +57,18 @@ static int link_set_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) assert(link); - log_link_debug(link, "Set link"); + if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER)) + return 1; r = sd_netlink_message_get_errno(m); if (r < 0 && r != -EEXIST) { log_link_message_warning_errno(link, m, r, "Failed to configure CAN link"); link_enter_failed(link); + return 1; } + log_link_debug(link, "Link set"); + return 1; }