GNOME Bugzilla – Bug 659983
packet loss with wired and wireless connected to the same network at the same time
Last modified: 2012-07-24 16:52:54 UTC
I'm specifying context here as dependent on libnl3, but I think it's probably just related to the rework for libnl in general. So, currently in git, if you connect both wired and wireless, it seems like the priority for devices is not being set. Routes appear in 'ip route list' without the "metric X" label that used to be there before, and I can distinctly see traffic coming out of eth0 here, and back in through wlan0 (which clearly fails. This was for a simple 'ping 8.8.8.8', which ends up with a high percentage of packet loss, since traffic comes back on the wrong interface from what's expected, with some small exceptions apparently based on how ARP requests pass by). I've spent all day hacking at it, but must admit I'm stumped. Here's how far I am: nm_system_device_set_priority() gets called, but as it calls nm_netlink_foreach_route(); the cache doesn't appear to contain all the routes it should: specifically, the link route through each device. The first line below is something I added to nm_system_device_set_priority(); just before the call to nm_netlink_foreach_route. If this (and then going through the find_route callback) was to complete, you'd see another entry "setting iface 2 priority to 1". NetworkManager[32490]: <debug> [1316808008.684440] [nm-system.c:1177] nm_system_device_set_priority(): trying to set iface 2 route priority to 1 NetworkManager[32490]: <debug> [1316808008.685462] [nm-netlink-utils.c:317] dump_route(): route idx 2 family INET (2) addr 224.0.0.22/32 NetworkManager[32490]: <debug> [1316808008.685697] [nm-netlink-utils.c:317] dump_route(): route idx 2 family INET (2) addr 224.0.0.251/32 NetworkManager[32490]: <debug> [1316808008.685889] [nm-netlink-utils.c:317] dump_route(): route idx 3 family INET (2) addr 10.153.108.1/32 NetworkManager[32490]: <debug> [1316808008.686048] [nm-netlink-utils.c:317] dump_route(): route idx 1 family INET (2) addr 10.153.108.129/32 NetworkManager[32490]: <debug> [1316808008.686199] [nm-netlink-utils.c:317] dump_route(): route idx 3 family INET (2) addr 8.8.8.8/32 NetworkManager[32490]: <debug> [1316808008.686345] [nm-netlink-utils.c:317] dump_route(): route idx 1 family INET (2) addr 10.153.108.129/32 NetworkManager[32490]: <info> (eth0): device state change: ip-config -> activated (reason 'none') [70 100 0] I'm expecting here to see an entry from dump_route() listing, for idx 2, 10.153.108.115/24 I think. Regardless, I expect set_priority() to succeed and be able to see "metric 1" next to the eth0 link route. As further information, if I manually remove the routes and re-add them with the metric keyword, then traffic flows as expected.
I can conclusively say this is specific to libnl3; if I rebuild NetworkManager against libnl1, I then get the metric properly set to the routes by NM.
So this was identified as caused by passing NL_AUTO_PROVIDE to rtnl_route_alloc_cache(). I sent a patch to fix this to the mailing list.
This appears to be fixed in libnl3. Reopen as needed.