summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-03-05 08:22:09 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2024-03-05 13:19:47 +0100
commit21fdecdc1311139bde8176d351a7a341ba279fcd (patch)
treebdc9d2502d4496a01970dfcff9eb0ed093e757b0
parenttest: check for kernel.apparmor_restrict_unprivileged_userns (diff)
downloadsystemd-21fdecdc1311139bde8176d351a7a341ba279fcd.tar.xz
systemd-21fdecdc1311139bde8176d351a7a341ba279fcd.zip
sd-netlink: allow to call rtnl_get_link_info() without iftype and flags
-rw-r--r--src/libsystemd/sd-netlink/netlink-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/sd-netlink/netlink-util.c
index e634fd3378..90616094bc 100644
--- a/src/libsystemd/sd-netlink/netlink-util.c
+++ b/src/libsystemd/sd-netlink/netlink-util.c
@@ -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) {