summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-10-17 20:54:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-10-17 20:54:42 +0000
commit3e3404572ddd39b26b8c2bfe81515d858cba68c9 (patch)
tree6dacbbdbd3cc81e0e7c46ce48fc309ce54388bf1 /usr.sbin
parentdf637878e9a48da3139cf594488909e0d568ec14 (diff)
From ripd: Add missing RTM_VERSION checks.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospf6d/kroute.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ospf6d/kroute.c b/usr.sbin/ospf6d/kroute.c
index fa03d7c2b61..52f65f501ee 100644
--- a/usr.sbin/ospf6d/kroute.c
+++ b/usr.sbin/ospf6d/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.4 2007/10/16 08:41:56 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.5 2007/10/17 20:54:41 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -1149,6 +1149,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 *)(rtm + 1);
get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
@@ -1328,6 +1330,8 @@ dispatch_rtmsg(void)
lim = buf + n;
for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)next;
+ if (rtm->rtm_version != RTM_VERSION)
+ continue;
bzero(&prefix, sizeof(prefix));
bzero(&nexthop, sizeof(nexthop));