1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00

udev: cache obtained sysattr from netlink into sd_device object

This commit is contained in:
Yu Watanabe 2021-09-15 13:27:59 +09:00
parent 552b1699e2
commit 78ae4d449e

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, ... */ /* skip stacked devices, like VLANs, ... */
if (info.ifindex != (int) info.iflink) if (info.ifindex != (int) info.iflink)
return 0; return 0;