On Fri, 2014-09-19 at 21:21 -0500, Kevin Baker wrote:
Hello all, I was wondering if there was some justification for the priority listing in src/nm-device.c: nm_device_get_priority(). Specifically, that a MODEM connection is higher in the priority than a WIFI connection. Note that this is not for connection priority support within the same device type (like bug 580018 [1]), but across different devices, mainly for the default route. The reason for asking is that our device will automatically activate a Wi-Fi connection when it is detected in range, and fall back to a 3G Modem if it goes out of range / is unavailable. This works great, however since WiFi is given lower priority by NM, the default route stays on the 3G connection all the time. Is this just a historical thing? Having WiFi priority over Modem would also match other platforms such as Android. I can submit the patch we are using to swap these (super simple) if desired. Thanks! Kevin
The priority of MODEM vs. WIFI was changed by commit: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=eefda8aa7df28fb419b8ff827cfba0f8177b1485 before, the priority was based on nm_device_get_device_type(), with NM_DEVICE_TYPE_WIFI=2, NM_DEVICE_TYPE_MODEM=8. I don't know the reasons for that change. nm_device_get_priority() was/is used both for the autoconnect-priority and route-metric. Back then, we also accepted a change of behavior and I think a behavioral change now would be acceptable as well. And I tend to agree that WIFI should have higher priority then MODEM. Thomas
Attachment:
signature.asc
Description: This is a digitally signed message part