summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-08-24 13:12:17 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-08-24 13:12:17 +0000
commitb3a283b77f201da020e65f785a9f0f1b6c5a9554 (patch)
tree4399d940032539f9b2905fa0c33f3fceb3cab602 /usr.sbin
parentb184ef7b5f953948581d82da28d24df166d971e9 (diff)
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')
-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) {