From 78ae4d449eb44cf5ad72803087a7ad4aa0e338a2 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 15 Sep 2021 13:27:59 +0900 Subject: [PATCH] udev: cache obtained sysattr from netlink into sd_device object --- src/udev/udev-builtin-net_id.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index ec30df51b9a..bc174ad9653 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -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;