mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 06:25:25 +03:00
core: loopback - correctly fail the loopback_check if somehow the rtnl calls fail
This commit is contained in:
parent
315a73d97f
commit
2f0af4e120
@ -63,15 +63,15 @@ static bool check_loopback(sd_rtnl *rtnl) {
|
||||
|
||||
r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, LOOPBACK_IFINDEX);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return false;
|
||||
|
||||
r = sd_rtnl_call(rtnl, req, 0, &reply);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return false;
|
||||
|
||||
r = sd_rtnl_message_link_get_flags(reply, &flags);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return false;
|
||||
|
||||
return flags & IFF_UP;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user