mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
network: route: make route_cancel_request() take Link*
As the Route object may be managed by Manager.
This commit is contained in:
parent
1d44187ce6
commit
95eb38c8d0
@ -184,7 +184,7 @@ int dhcp6_pd_remove(Link *link, bool only_marked) {
|
||||
if (k < 0)
|
||||
r = k;
|
||||
|
||||
route_cancel_request(route);
|
||||
route_cancel_request(route, link);
|
||||
}
|
||||
} else {
|
||||
Address *address;
|
||||
|
@ -71,7 +71,7 @@ static int dhcp4_remove_address_and_routes(Link *link, bool only_marked) {
|
||||
if (k < 0)
|
||||
r = k;
|
||||
|
||||
route_cancel_request(route);
|
||||
route_cancel_request(route, link);
|
||||
}
|
||||
|
||||
SET_FOREACH(address, link->addresses) {
|
||||
|
@ -63,7 +63,7 @@ static int dhcp6_remove(Link *link, bool only_marked) {
|
||||
if (k < 0)
|
||||
r = k;
|
||||
|
||||
route_cancel_request(route);
|
||||
route_cancel_request(route, link);
|
||||
}
|
||||
|
||||
SET_FOREACH(address, link->addresses) {
|
||||
|
@ -90,7 +90,7 @@ static int ndisc_remove(Link *link, struct in6_addr *router) {
|
||||
if (k < 0)
|
||||
r = k;
|
||||
|
||||
route_cancel_request(route);
|
||||
route_cancel_request(route, link);
|
||||
}
|
||||
|
||||
SET_FOREACH(address, link->addresses) {
|
||||
|
@ -1260,24 +1260,25 @@ static int route_configure(
|
||||
return 0;
|
||||
}
|
||||
|
||||
void route_cancel_request(Route *route) {
|
||||
void route_cancel_request(Route *route, Link *link) {
|
||||
Request req;
|
||||
|
||||
assert(route);
|
||||
|
||||
link = route->link ?: link;
|
||||
|
||||
assert(link);
|
||||
|
||||
if (!route_is_requesting(route))
|
||||
return;
|
||||
|
||||
if (!route->link)
|
||||
return;
|
||||
|
||||
req = (Request) {
|
||||
.link = route->link,
|
||||
.link = link,
|
||||
.type = REQUEST_TYPE_ROUTE,
|
||||
.route = route,
|
||||
};
|
||||
|
||||
request_drop(ordered_set_get(route->link->manager->request_queue, &req));
|
||||
request_drop(ordered_set_get(link->manager->request_queue, &req));
|
||||
route_cancel_requesting(route);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ int link_drop_routes(Link *link);
|
||||
int link_drop_foreign_routes(Link *link);
|
||||
void link_foreignize_routes(Link *link);
|
||||
|
||||
void route_cancel_request(Route *route);
|
||||
void route_cancel_request(Route *route, Link *link);
|
||||
int link_request_route(
|
||||
Link *link,
|
||||
Route *route,
|
||||
|
Loading…
Reference in New Issue
Block a user