mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 01:30:16 +01:00
netlink: fix rtnl_route_alloc_cache() call
Same fix as in commit 195a09d7c0.
NL_AUTO_PROVIDE is not a valid flag for this call and it's coincidental
with ROUTE_CACHE_CONTENT, which is not what we want.
One result arising from this fix is that per-device routes are now
assigned priorities correctly. This means, for instance, you can have a
wired and wireless connection on the same network, and have the wired
connection always take precedence whilst it's available.
Signed-off-by: Michael Chapman <mike@very.puzzling.org>
This commit is contained in:
parent
b9ea3ed1b1
commit
c43b7703cb
1 changed files with 1 additions and 1 deletions
|
|
@ -462,7 +462,7 @@ nm_netlink_foreach_route (int ifindex,
|
|||
info.user_data = user_data;
|
||||
info.iface = nm_netlink_index_to_iface (ifindex);
|
||||
|
||||
rtnl_route_alloc_cache (nm_netlink_get_default_handle (), family, NL_AUTO_PROVIDE, &cache);
|
||||
rtnl_route_alloc_cache (nm_netlink_get_default_handle (), family, 0, &cache);
|
||||
g_warn_if_fail (cache != NULL);
|
||||
if (cache) {
|
||||
nl_cache_foreach (cache, foreach_route_cb, &info);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue