]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: cache obtained sysattr from netlink into sd_device object
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 Sep 2021 04:27:59 +0000 (13:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Oct 2021 07:39:52 +0000 (16:39 +0900)
src/udev/udev-builtin-net_id.c

index ec30df51b9acf736eae4e6a0a4d4b219d709eb1a..bc174ad9653b476ef8026f1a731eff39d9109271 100644 (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;