diff options
Diffstat (limited to 'src/nm-device-vlan.c')
| -rw-r--r-- | src/nm-device-vlan.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nm-device-vlan.c b/src/nm-device-vlan.c index b9c93234..59d95554 100644 --- a/src/nm-device-vlan.c +++ b/src/nm-device-vlan.c @@ -636,7 +636,11 @@ nm_device_vlan_new (const char *udi, const char *iface, NMDevice *parent) int vlan_id; itype = nm_system_get_iface_type (ifindex, iface); - g_assert (itype == NM_IFACE_TYPE_VLAN); + if (itype != NM_IFACE_TYPE_VLAN) { + nm_log_err (LOGD_DEVICE, "(%s): failed to get VLAN interface type.", iface); + g_object_unref (device); + return NULL; + } if (!nm_system_get_iface_vlan_info (ifindex, &parent_ifindex, &vlan_id)) { nm_log_warn (LOGD_DEVICE, "(%s): failed to get VLAN interface info.", iface); |