network: call netlink in the last of route_configure()
Otherwise, assertion will be hit when route_add() fails.
This commit is contained in:
parent
40075951dc
commit
0c54bfd698
|
@ -1119,13 +1119,6 @@ int route_configure(
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_error_errno(link, r, "Could not append RTA_MULTIPATH attribute: %m");
|
return log_link_error_errno(link, r, "Could not append RTA_MULTIPATH attribute: %m");
|
||||||
|
|
||||||
r = netlink_call_async(link->manager->rtnl, NULL, req, callback,
|
|
||||||
link_netlink_destroy_callback, link);
|
|
||||||
if (r < 0)
|
|
||||||
return log_link_error_errno(link, r, "Could not send rtnetlink message: %m");
|
|
||||||
|
|
||||||
link_ref(link);
|
|
||||||
|
|
||||||
if (ordered_set_isempty(route->multipath_routes)) {
|
if (ordered_set_isempty(route->multipath_routes)) {
|
||||||
Route *nr;
|
Route *nr;
|
||||||
|
|
||||||
|
@ -1147,6 +1140,13 @@ int route_configure(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r = netlink_call_async(link->manager->rtnl, NULL, req, callback,
|
||||||
|
link_netlink_destroy_callback, link);
|
||||||
|
if (r < 0)
|
||||||
|
return log_link_error_errno(link, r, "Could not send rtnetlink message: %m");
|
||||||
|
|
||||||
|
link_ref(link);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue