summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2021-04-27 01:25:58 -0700
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-04-28 00:06:20 +0900
commit192a9d95ea3e058afd824d38a9cea16ad0a84a57 (patch)
treea4613c656bab2695aadf82dd63b3827bf8958856 /src/libsystemd
parent45b1fc3a88b2f5102ecabfabdf0ee4f175aecd64 (diff)
downloadsystemd-192a9d95ea3e058afd824d38a9cea16ad0a84a57.tar.gz
network: neighbor: Always add neighbors with replace
We were duplicating setting flags for the message and a combination of NLM_F_APPEND and NLM_F_CREATE which does not make sense. We should have been using NLM_F_REPLACE and NLM_F_CREATE since the kernel can dynamically create neighbors prior to us adding an entry. Otherwise, we can end up with cases where the message will time out after ~25s even though the neighbor still gets added. This delays the rest of the setup of the interface even though the error is ultimately ignored.
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-netlink/rtnl-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-netlink/rtnl-message.c b/src/libsystemd/sd-netlink/rtnl-message.c
index d14fa1a5cb..ead1967258 100644
--- a/src/libsystemd/sd-netlink/rtnl-message.c
+++ b/src/libsystemd/sd-netlink/rtnl-message.c
@@ -447,7 +447,7 @@ int sd_rtnl_message_new_neigh(sd_netlink *rtnl, sd_netlink_message **ret, uint16
return r;
if (nlmsg_type == RTM_NEWNEIGH)
- (*ret)->hdr->nlmsg_flags |= NLM_F_CREATE | NLM_F_APPEND;
+ (*ret)->hdr->nlmsg_flags |= NLM_F_CREATE | NLM_F_REPLACE;
ndm = NLMSG_DATA((*ret)->hdr);