From 8b626d9e8bf68a2df42b4590536160382dbb60a2 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 31 Mar 2022 11:16:12 +0200 Subject: [PATCH] wwan: re-enable IPv6 once the modem returns a IPv6 configuration IPv6 gets disabled at the beginning of the activation in ip_ifindex_changed_cb(). Enable it again when the modem returns a IPv6 configuration. Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/944 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1170 (cherry picked from commit 586afdfc5298285d09a5b4965690899833a21abb) --- src/core/devices/wwan/nm-device-modem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/devices/wwan/nm-device-modem.c b/src/core/devices/wwan/nm-device-modem.c index ef802a44f2..11a994ea74 100644 --- a/src/core/devices/wwan/nm-device-modem.c +++ b/src/core/devices/wwan/nm-device-modem.c @@ -181,8 +181,10 @@ modem_new_config(NMModem *modem, return; } - if (!IS_IPv4) + if (!IS_IPv4) { priv->iid = iid ? *iid : ((NMUtilsIPv6IfaceId) NM_UTILS_IPV6_IFACE_ID_INIT); + nm_device_sysctl_ip_conf_set(device, AF_INET6, "disable_ipv6", "0"); + } if (do_auto) { if (IS_IPv4)