]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: the kernel ignores NLM_F_APPEND in RTM_NEWNEXTHOP message but uses NLM_F_... 30440/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 13 Dec 2023 06:37:06 +0000 (15:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 14 Dec 2023 09:58:26 +0000 (18:58 +0900)
See insert_nexthop() in net/ipv4/nexthop.c of the kernel.

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

index 008e8022b1dbe376b7e2b6197d24658a567a888c..09116b14380ce445451feb8fc37d3028e9c81818 100644 (file)
@@ -336,7 +336,7 @@ int sd_rtnl_message_new_nexthop(sd_netlink *rtnl, sd_netlink_message **ret,
                 return r;
 
         if (nlmsg_type == RTM_NEWNEXTHOP)
-                (*ret)->hdr->nlmsg_flags |= NLM_F_CREATE | NLM_F_APPEND;
+                (*ret)->hdr->nlmsg_flags |= NLM_F_CREATE | NLM_F_REPLACE;
 
         nhm = NLMSG_DATA((*ret)->hdr);