From 21887f88fa8e072702cde2dad70e11473ccc028b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 5 Dec 2022 14:45:18 +0100 Subject: [PATCH] modem: fix unalined access in stage3_ip_config_start() Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') --- src/core/devices/wwan/nm-modem-broadband.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/devices/wwan/nm-modem-broadband.c b/src/core/devices/wwan/nm-modem-broadband.c index 556df83198..f0907c46b0 100644 --- a/src/core/devices/wwan/nm-modem-broadband.c +++ b/src/core/devices/wwan/nm-modem-broadband.c @@ -1122,8 +1122,8 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho address.plen = mm_bearer_ip_config_get_prefix(self->_priv.ipv6_config); if (address.plen <= 128) { if (IN6_IS_ADDR_LINKLOCAL(&address.address)) { - iid_data.id = ((guint64 *) (&address.address.s6_addr))[1]; - iid = &iid_data; + nm_utils_ipv6_interface_identifier_get_from_addr(&iid_data, &address.address); + iid = &iid_data; } else do_auto = FALSE; nm_l3_config_data_add_address_6(l3cd, &address);