summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-04-27 15:36:47 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-04-27 15:36:47 +0000
commitfd7f0e125b26c942fb4ee088238adee3edd75d78 (patch)
treeb07a4229976635fd5fdd449bf29a36d0d8e0ae56 /usr.sbin
parent1758180cb055390537cf52a545c69803315589e1 (diff)
Dumb mistake done twice. First in ospfd then synced to snmpd. rtm_errno
is only valid for messages with an rt_msghdr. So move the check back where it was before. Problem found by jsg@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/snmpd/kroute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/kroute.c b/usr.sbin/snmpd/kroute.c
index 43726bc6400..b852ec634d1 100644
--- a/usr.sbin/snmpd/kroute.c
+++ b/usr.sbin/snmpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.12 2010/04/01 14:42:32 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.13 2010/04/27 15:36:46 claudio Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -1011,8 +1011,6 @@ rtmsg_process(char *buf, int len)
rtm = (struct rt_msghdr *)next;
if (rtm->rtm_version != RTM_VERSION)
continue;
- if (rtm->rtm_errno) /* failed attempts */
- continue;
sa = (struct sockaddr *)(next + rtm->rtm_hdrlen);
get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
@@ -1022,6 +1020,8 @@ rtmsg_process(char *buf, int len)
case RTM_GET:
case RTM_CHANGE:
case RTM_DELETE:
+ if (rtm->rtm_errno) /* failed attempts */
+ continue;
if (rtm->rtm_flags & RTF_LLINFO) /* arp cache */
continue;