summaryrefslogtreecommitdiffstats
path: root/usr.sbin/arp/arp.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2007-08-24 13:12:16 +0000
committerclaudio <claudio@openbsd.org>2007-08-24 13:12:16 +0000
commit62ae07b0525cadc5a5bc7f9d934cb3f27cef753d (patch)
treebd861d13626b618eed7a62c0a386c7262836d918 /usr.sbin/arp/arp.c
parentAdd a new configuration directive 'RLimitNOFILE' to set the number of (diff)
downloadwireguard-openbsd-62ae07b0525cadc5a5bc7f9d934cb3f27cef753d.tar.xz
wireguard-openbsd-62ae07b0525cadc5a5bc7f9d934cb3f27cef753d.zip
Yet another application that does not check if the RTM_VERSION is the expected
one. Luckily it seems that only show is affected. OK henning@
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r--usr.sbin/arp/arp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 9b2013f573c..65e41ebce62 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arp.c,v 1.39 2007/02/18 23:50:47 ray Exp $ */
+/* $OpenBSD: arp.c,v 1.40 2007/08/24 13:12:16 claudio Exp $ */
/* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */
/*
@@ -435,6 +435,8 @@ search(in_addr_t addr, void (*action)(struct sockaddr_dl *sdl,
lim = buf + needed;
for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)next;
+ if (rtm->rtm_version != RTM_VERSION)
+ continue;
sin = (struct sockaddr_inarp *)(rtm + 1);
sdl = (struct sockaddr_dl *)(sin + 1);
if (addr) {