linux-platform: don't try to read vlan id from netlink objects without type set

They just don't have the information.
This commit is contained in:
Lubomir Rintel
2015-06-26 15:43:16 +02:00
parent 348452f1e0
commit 8a1f4beb65

View File

@@ -1000,7 +1000,7 @@ _nmp_vt_cmd_plobj_init_from_nl_link (NMPlatform *platform, NMPlatformObject *_ob
obj->mtu = rtnl_link_get_mtu (nlo);
obj->arptype = rtnl_link_get_arptype (nlo);
if (obj->type == NM_LINK_TYPE_VLAN)
if (!g_strcmp0 (rtnl_link_get_type (nlo), "vlan"))
obj->vlan_id = rtnl_link_vlan_get_id (nlo);
if ((nladdr = rtnl_link_get_addr (nlo))) {