From 97bb863c257e11870583485e22c4b6d9747ce952 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 24 May 2021 22:30:44 +0900 Subject: [PATCH] sd-netlink: do not append prefixlen by default Otherwise, when NETLINK_GET_STRICT_CHK socket option is enabled, no address will be dumped. --- src/libsystemd/sd-netlink/rtnl-message.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libsystemd/sd-netlink/rtnl-message.c b/src/libsystemd/sd-netlink/rtnl-message.c index 6b4c213e1e5..e9710124206 100644 --- a/src/libsystemd/sd-netlink/rtnl-message.c +++ b/src/libsystemd/sd-netlink/rtnl-message.c @@ -671,10 +671,6 @@ int sd_rtnl_message_new_addr(sd_netlink *rtnl, sd_netlink_message **ret, ifa->ifa_index = index; ifa->ifa_family = family; - if (family == AF_INET) - ifa->ifa_prefixlen = 32; - else if (family == AF_INET6) - ifa->ifa_prefixlen = 128; return 0; } -- 2.47.3