diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 17:02:31 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 17:02:31 +0000 |
commit | c9f94f17be3d214c96c352c13f54d16a90c36c48 (patch) | |
tree | ebd355f6e608a8bfab40340e6eb417de7c8493a8 /usr.sbin | |
parent | 640afd7cb1f179f40ce2ec11573433a79af05ebe (diff) |
Another kroute.c needing RTM_VERSION checks. Looked over by sthen@ and henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/snmpd/kroute.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/kroute.c b/usr.sbin/snmpd/kroute.c index 6772b6f516b..152e03dcd4d 100644 --- a/usr.sbin/snmpd/kroute.c +++ b/usr.sbin/snmpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.7 2009/06/05 22:40:24 chris Exp $ */ +/* $OpenBSD: kroute.c,v 1.8 2009/06/25 17:02:30 claudio Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -812,6 +812,8 @@ fetchtable(void) lim = buf + len; for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; + if (rtm->rtm_version != RTM_VERSION) + continue; sa = (struct sockaddr *)(next + rtm->rtm_hdrlen); get_rtaddrs(rtm->rtm_addrs, sa, rti_info); @@ -986,6 +988,8 @@ dispatch_rtmsg(int fd, short event, void *arg) lim = buf + n; for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; + if (rtm->rtm_version != RTM_VERSION) + continue; prefix.s_addr = 0; prefixlen = 0; |