From b3a283b77f201da020e65f785a9f0f1b6c5a9554 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 24 Aug 2007 13:12:17 +0000 Subject: 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@ --- usr.sbin/arp/arp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3