device: always process hop limit and MTU from the RA
authorLubomir Rintel <lkundrak@v3.sk>
Fri, 15 Jan 2016 11:07:00 +0000 (12:07 +0100)
committerLubomir Rintel <lkundrak@v3.sk>
Fri, 15 Jan 2016 11:08:24 +0000 (12:08 +0100)
Apply MTU and hop limit when managed or other flag is set as well. This wasn't
the case for the first RA and the previous commit made it slightly worse by
always ignoring it.

Fixes: ad2584c375e21e262ef0c40880a7374e7372c746

src/devices/nm-device.c

index 72b1484..231ab00 100644 (file)
@@ -5500,13 +5500,11 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *self)
                }
        }
 
-       if (priv->dhcp6_mode == NM_RDISC_DHCP_LEVEL_NONE) {
-               if (changed & NM_RDISC_CONFIG_HOP_LIMIT)
-                       nm_platform_sysctl_set_ip6_hop_limit_safe (NM_PLATFORM_GET, nm_device_get_ip_iface (self), rdisc->hop_limit);
+       if (changed & NM_RDISC_CONFIG_HOP_LIMIT)
+               nm_platform_sysctl_set_ip6_hop_limit_safe (NM_PLATFORM_GET, nm_device_get_ip_iface (self), rdisc->hop_limit);
 
-               if (changed & NM_RDISC_CONFIG_MTU)
-                       priv->ip6_mtu = rdisc->mtu;
-       }
+       if (changed & NM_RDISC_CONFIG_MTU)
+               priv->ip6_mtu = rdisc->mtu;
 
        nm_device_activate_schedule_ip6_config_result (self);
 }