aboutgitcodebugslistschat
path: root/netlink.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-08-15 13:51:27 +1000
committerStefano Brivio <sbrivio@redhat.com>2023-08-16 08:09:49 +0200
commit4b9f4c251344bf350454d0b9e9184ae663c39fc3 (patch)
tree0c9c82b542f12a412c97b505213871cdd93ae1c9 /netlink.c
parent5ed4e034b2ca3b101319b0815cc6002a2ea9ee1a (diff)
downloadpasst-4b9f4c251344bf350454d0b9e9184ae663c39fc3.tar
passt-4b9f4c251344bf350454d0b9e9184ae663c39fc3.tar.gz
passt-4b9f4c251344bf350454d0b9e9184ae663c39fc3.tar.bz2
passt-4b9f4c251344bf350454d0b9e9184ae663c39fc3.tar.lz
passt-4b9f4c251344bf350454d0b9e9184ae663c39fc3.tar.xz
passt-4b9f4c251344bf350454d0b9e9184ae663c39fc3.tar.zst
passt-4b9f4c251344bf350454d0b9e9184ae663c39fc3.zip
netlink: Remove redundant check on nlmsg_type
In the loop within nl_addr_dup() we check and skip for any messages that aren't of type RTM_NEWADDR. This is a leftover that was missed in the recent big netlink cleanup. In fact we already check for the message type in the nl_foreach_oftype() macro, so the explicit test is redudant. Remove it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'netlink.c')
-rw-r--r--netlink.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/netlink.c b/netlink.c
index 1226379..ff44e13 100644
--- a/netlink.c
+++ b/netlink.c
@@ -669,9 +669,6 @@ int nl_addr_dup(int s_src, unsigned int ifi_src,
struct rtattr *rta;
size_t na;
- if (nh->nlmsg_type != RTM_NEWADDR)
- continue;
-
ifa = (struct ifaddrmsg *)NLMSG_DATA(nh);
if (rc < 0 || ifa->ifa_scope == RT_SCOPE_LINK ||