udev: cache obtained sysattr from netlink into sd_device object

This commit is contained in:
Yu Watanabe
2021-10-06 16:39:52 +09:00
parent 552b1699e2
commit 78ae4d449e
+4
View File
@@ -870,6 +870,10 @@ static int builtin_net_id(sd_device *dev, sd_netlink **rtnl, int argc, char *arg
}
}
r = device_cache_sysattr_from_link_info(dev, &info);
if (r < 0)
return r;
/* skip stacked devices, like VLANs, ... */
if (info.ifindex != (int) info.iflink)
return 0;