1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-20 18:04:03 +03:00

network/route: also remove route on cancelling request

Otherwise, the route may arrive after we call
link_drop_foreign_address() or so on reconfiguring interface.

This is the one for routes of 4303e9806befc0c5b8067e45225e5d952f427b3a.
This commit is contained in:
Yu Watanabe 2024-01-07 06:11:09 +09:00
parent d529b12a01
commit 97979ece0e

View File

@ -997,6 +997,13 @@ static int link_drop_requests(Link *link) {
RET_GATHER(ret, nexthop_remove(nexthop, link->manager));
break;
}
case REQUEST_TYPE_ROUTE: {
Route *route = ASSERT_PTR(req->userdata);
if (route_get(link->manager, route, NULL) < 0)
RET_GATHER(ret, route_remove(route, link->manager));
break;
}
default:
;
}