summary refs log tree commit diff
path: root/src/nm-device-vlan.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-08-07 22:16:03 +0200
committerMichael Biebl <biebl@debian.org>2012-08-07 22:16:03 +0200
commit8c98b34228abb4dfde822ad89106b4d8b2287639 (patch)
tree9305205f351759c51888cd9f7d75a2eb5b0e1431 /src/nm-device-vlan.c
parent7f1d08cf21e97f5e60d4636bb1e6c287c34ee2df (diff)
Imported Upstream version 0.9.6.0 upstream/0.9.6.0
Diffstat (limited to 'src/nm-device-vlan.c')
-rw-r--r--src/nm-device-vlan.c6
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);