[PATCH] Re: Wired + Wireless cohexistence issues, using libnl3

So I actually found the cause for the missing routes in the libnl
cache: in nm_netlink_foreach_route(), when rtnl_route_alloc_cache() is
called, it is done with the NL_AUTO_PROVIDE flag. I don't know why
this was added; but replacing it with 0 (no flags), fixes the issue
with no apparent drawbacks.

A patch is attached.

Mathieu Trudel-Lapierre <mathieu tl gmail com>
Freenode: cyphermox, Jabber: mathieu tl gmail com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre <mathieu trudel-lapierre canonical com>
Subject: Unbreak setting priorities for routes
Bug: http://bugs.gnome.org/659983
Bug-Ubuntu: https://bugs.launchpad.net/bugs/856333

Passing NL_AUTO_PROVIDE to rtnl_route_alloc_cache() caused it to omit listing
a number of routes, including the ones we're actually interested in when
nm_netlink_foreach_route() is called. (e.g. for setting priority/metric).

Index: network-manager-
--- network-manager-	2011-09-28 11:29:13.463639084 -0400
+++ network-manager-	2011-09-28 11:29:25.779638535 -0400
@@ -413,7 +413,7 @@
 	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_return_val_if_fail (cache != NULL, NULL);
 	nl_cache_foreach (cache, foreach_route_cb, &info);
 	nl_cache_free (cache);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]