network: drop route_expire_callback() as it is duplicate of link_route_remove_handler()
This commit is contained in:
parent
fdb20b7c59
commit
e8d1666687
|
@ -449,32 +449,13 @@ int route_remove(Route *route, Link *link,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int route_expire_callback(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) {
|
||||
Link *link = userdata;
|
||||
int r;
|
||||
|
||||
assert(rtnl);
|
||||
assert(m);
|
||||
assert(link);
|
||||
assert(link->ifname);
|
||||
|
||||
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_warning_errno(link, r, "could not remove route: %m");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int route_expire_handler(sd_event_source *s, uint64_t usec, void *userdata) {
|
||||
Route *route = userdata;
|
||||
int r;
|
||||
|
||||
assert(route);
|
||||
|
||||
r = route_remove(route, route->link, route_expire_callback);
|
||||
r = route_remove(route, route->link, link_route_remove_handler);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Could not remove route: %m");
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue