GNOME Bugzilla – Bug 740780
[review] iface-helper: disambiguate route priority for IPv4 and IPv6
Last modified: 2014-12-01 16:00:48 UTC
Patches attached...
Created attachment 291587 [details] [review] core: rename NM_PLATFORM_ROUTE_METRIC_DEFAULT to NM_PLATFORM_ROUTE_METRIC_DEFAULT_IP6 For IPv4, iproute for example defaults to a metric of 0. Hence, the name NM_PLATFORM_ROUTE_METRIC_DEFAULT was misleading. Also add a NM_PLATFORM_ROUTE_METRIC_DEFAULT_IP4 define for completeness.
Created attachment 291588 [details] [review] iface-helper: disambiguate route priority for IPv4 and IPv6
Comment on attachment 291587 [details] [review] core: rename NM_PLATFORM_ROUTE_METRIC_DEFAULT to NM_PLATFORM_ROUTE_METRIC_DEFAULT_IP6 sure
Comment on attachment 291588 [details] [review] iface-helper: disambiguate route priority for IPv4 and IPv6 > g_ptr_array_add (argv, g_strdup_printf ("%u", nm_dhcp_client_get_priority (priv->dhcp4_client))); >+ g_ptr_array_add (argv, g_strdup_printf ("%u", nm_device_get_ip6_route_metric (self))); why do we use an NMDHCPClient method for 4, but an NMDevice method for 6?
(In reply to comment #4) > (From update of attachment 291588 [details] [review]) > > g_ptr_array_add (argv, g_strdup_printf ("%u", nm_dhcp_client_get_priority (priv->dhcp4_client))); > > >+ g_ptr_array_add (argv, g_strdup_printf ("%u", nm_device_get_ip6_route_metric (self))); > > why do we use an NMDHCPClient method for 4, but an NMDevice method for 6? I kept the pre-existing behavior. But both should yield the same result. Anyway, good point, I changed it (fixup!). Pushed patches to th/iface_helper_priority_bgo740780
> iface-helper: disambiguate route priority for IPv4 and IPv6 The same short argument "-p" is used for v4 and v6 priority: + { "priority4", 'p', 0, G_OPTION_ARG_INT64, &priority64_v4, N_("Route priority for IPv4"), N_("0") }, + { "priority6", 'p', 0, G_OPTION_ARG_INT64, &priority64_v6, N_("Route priority for IPv6"), N_("1024") }, That should be changed.
patches pushed to master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=ae2b8d6353391b86528e045ee9a56793871e8286 http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=711c0eab5be4e4e3ce42403edb88855251c1406f