device/vlan: check existence of ip6 configuration before reapplying it
authorBeniamino Galvani <bgalvani@redhat.com>
Fri, 12 Feb 2016 16:19:34 +0000 (17:19 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Fri, 12 Feb 2016 16:22:21 +0000 (17:22 +0100)
The connection might not have an ipv6 configuration, check for this
before calling nm_device_reactivate_ip6_config().

Fixes: 45b77dbcfce5188dc117c886e8be70ace72a4bc7

https://bugzilla.redhat.com/show_bug.cgi?id=1307070

src/devices/nm-device-vlan.c

index 2c48f5b..ac8808c 100644 (file)
@@ -115,7 +115,8 @@ parent_hwaddr_changed (NMDevice *parent,
                         * removing the IPv6 configuration; reapply it.
                         */
                        s_ip6 = nm_connection_get_setting_ip6_config (connection);
-                       nm_device_reactivate_ip6_config (NM_DEVICE (self), s_ip6, s_ip6);
+                       if (s_ip6)
+                               nm_device_reactivate_ip6_config (NM_DEVICE (self), s_ip6, s_ip6);
                }
        }
 }