]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: do not append prefixlen by default
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 24 May 2021 13:30:44 +0000 (22:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 24 May 2021 23:26:00 +0000 (08:26 +0900)
Otherwise, when NETLINK_GET_STRICT_CHK socket option is enabled, no
address will be dumped.

src/libsystemd/sd-netlink/rtnl-message.c

index 6b4c213e1e51aaf7b6be313a2659ac93790e4827..e9710124206e4fe759e2f97fe7689d5072d5a292 100644 (file)
@@ -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;
 }