summaryrefslogtreecommitdiff
path: root/src/devices/wwan/nm-device-modem.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-12-13 11:09:45 +0100
committerThomas Haller <thaller@redhat.com>2018-12-19 08:58:50 +0100
commitd27fa362722e9ccfdc29aae49b098bece0e4ca00 (patch)
tree4f39cd16d37e56f5378063806a417bfb8b96722e /src/devices/wwan/nm-device-modem.c
parent8b9fd01ef355d78dab9eb4c3811d56bcf2e749b8 (diff)
downloadNetworkManager-d27fa362722e9ccfdc29aae49b098bece0e4ca00.tar.gz
device: merge IPv4 and IPv6 variants of nm_device_ipv4_sysctl_set()
For one, next we will drop setting rp_filter, hence there are no more users of an IPv4 variant and nm_device_ipv4_sysctl_set() would have to be dropped anyway. However, instead of doing that, merge the IPv4 and IPv6 variant. With this, the fallback to the default is now also supported for IPv6 (though unused). Also, don't access nm_device_get_ip_iface(). The interface name might not be right, we should only rely on the ifindex. Load the interface name from platform cache instead.
Diffstat (limited to 'src/devices/wwan/nm-device-modem.c')
-rw-r--r--src/devices/wwan/nm-device-modem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c
index be08498608..ae606009e4 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -244,7 +244,7 @@ modem_ip6_config_result (NMModem *modem,
}
/* Re-enable IPv6 on the interface */
- nm_device_ipv6_sysctl_set (device, "disable_ipv6", "0");
+ nm_device_ip_sysctl_set (device, AF_INET6, "disable_ipv6", "0");
if (config)
nm_device_set_wwan_ip6_config (device, config);
@@ -303,7 +303,7 @@ ip_ifindex_changed_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
* internally, and leaving it enabled could allow the kernel's IPv6
* RA handling code to run before NM is ready.
*/
- nm_device_ipv6_sysctl_set (device, "disable_ipv6", "1");
+ nm_device_ip_sysctl_set (device, AF_INET6, "disable_ipv6", "1");
}
static void