diff options
| author | Aron Xu <aron@debian.org> | 2016-12-20 20:07:38 +0800 |
|---|---|---|
| committer | Aron Xu <aron@debian.org> | 2016-12-20 20:07:38 +0800 |
| commit | 3bf5cabfc7d7a3c7fdb4e2bc3d771d2a07db8bc0 (patch) | |
| tree | 1ac587c7e73af842b847599dc29b44430bf112ff /libnm/nm-device-vlan.c | |
| parent | 1836daa45f4f0d8d0b791ed020774b915e9dd92d (diff) | |
| parent | 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (diff) | |
Merge tag 'upstream/1.4.4'
Upstream version 1.4.4
Diffstat (limited to 'libnm/nm-device-vlan.c')
| -rw-r--r-- | libnm/nm-device-vlan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libnm/nm-device-vlan.c b/libnm/nm-device-vlan.c index 843dda02..330d6f4a 100644 --- a/libnm/nm-device-vlan.c +++ b/libnm/nm-device-vlan.c @@ -116,6 +116,7 @@ nm_device_vlan_get_vlan_id (NMDeviceVlan *device) static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { + NMDeviceVlanPrivate *priv; NMSettingVlan *s_vlan; NMSettingWired *s_wired; const char *setting_hwaddr; @@ -142,8 +143,10 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro else setting_hwaddr = NULL; if (setting_hwaddr) { - if (!nm_utils_hwaddr_matches (setting_hwaddr, -1, - NM_DEVICE_VLAN_GET_PRIVATE (device)->hw_address, -1)) { + priv = NM_DEVICE_VLAN_GET_PRIVATE (device); + if ( !priv->hw_address + || !nm_utils_hwaddr_matches (setting_hwaddr, -1, + priv->hw_address, -1)) { g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION, _("The hardware address of the device and the connection didn't match.")); } |