summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2018-12-19 19:13:17 +0100
committerDmitry Kozlov <xeb@mail.ru>2018-12-20 06:21:35 +0300
commit412e908eb181901daaea6eee4174787f65901d3f (patch)
treed59073f03bddc512972fcdde3e6fa21486491479
parent525fe7ee879c758f91b1f48c25598775ac6d62ad (diff)
downloadaccel-ppp-412e908eb181901daaea6eee4174787f65901d3f.tar.gz
accel-ppp-412e908eb181901daaea6eee4174787f65901d3f.zip
iputils: remove NLM_F_CREATE flag from ip6{route,addr}_del()
These are deletion requests. NLM_F_CREATE is confusing for readers and ignored by kernel. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r--accel-pppd/libnetlink/iputils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c
index f04f348..5dfd097 100644
--- a/accel-pppd/libnetlink/iputils.c
+++ b/accel-pppd/libnetlink/iputils.c
@@ -600,7 +600,7 @@ int __export ip6route_del(int ifindex, const struct in6_addr *dst, int pref_len,
memset(&req, 0, sizeof(req) - 4096);
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
- req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE;
+ req.n.nlmsg_flags = NLM_F_REQUEST;
req.n.nlmsg_type = RTM_DELROUTE;
req.i.rtm_family = AF_INET6;
req.i.rtm_table = RT_TABLE_MAIN;
@@ -708,7 +708,7 @@ int __export ip6addr_del(int ifindex, struct in6_addr *addr, int prefix_len)
memset(&req, 0, sizeof(req) - 4096);
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
- req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE;
+ req.n.nlmsg_flags = NLM_F_REQUEST;
req.n.nlmsg_type = RTM_DELADDR;
req.i.ifa_family = AF_INET6;
req.i.ifa_index = ifindex;