]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: allow to call rtnl_get_link_info() without iftype and flags
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Mar 2024 07:22:09 +0000 (16:22 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 5 Mar 2024 12:19:47 +0000 (12:19 +0000)
src/libsystemd/sd-netlink/netlink-util.c

index e634fd33788f191706ae5021ce81320507b27b7c..90616094bc88a7fbed85699630f47dc8e18b78e9 100644 (file)
@@ -509,7 +509,7 @@ int rtnl_get_link_info(
         assert(rtnl);
         assert(ifindex > 0);
 
-        if (!ret_iftype && !ret_flags)
+        if (!ret_iftype && !ret_flags && !ret_kind && !ret_hw_addr && !ret_permanent_hw_addr)
                 return 0;
 
         if (!*rtnl) {