diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 02ce08ff2e..2ff4ab6a08 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3332,13 +3332,14 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *device nm_platform_check_support_kernel_extended_ifa_flags (); } - /* without system_support, these flags will be ignored. - * Still, we set them (why not?). - **/ - ifa_flags = IFA_F_NOPREFIXROUTE; + if (system_support) + ifa_flags = IFA_F_NOPREFIXROUTE; if (priv->rdisc_use_tempaddr == NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR || priv->rdisc_use_tempaddr == NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR) + { + /* without system_support, this flag will be ignored. Still set it, doesn't seem to do any harm. */ ifa_flags |= IFA_F_MANAGETEMPADDR; + } g_return_if_fail (priv->act_request); connection = nm_device_get_connection (device); diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c index 7de01ece42..8ca7c0cd05 100644 --- a/src/nm-ip6-config.c +++ b/src/nm-ip6-config.c @@ -513,7 +513,8 @@ nm_ip6_config_destination_is_direct (const NMIP6Config *config, const struct in6 for (i = 0; i < num; i++) { const NMPlatformIP6Address *item = nm_ip6_config_get_address (config, i); - if (item->plen <= plen && same_prefix (&item->address, network, item->plen)) + if (item->plen <= plen && same_prefix (&item->address, network, item->plen) && + !(item->flags & IFA_F_NOPREFIXROUTE)) return TRUE; }