diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-10-17 20:52:43 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-10-17 20:52:43 +0000 |
commit | df637878e9a48da3139cf594488909e0d568ec14 (patch) | |
tree | ef1731383c810e394566b9cae30caeccd711a1b3 /usr.sbin/ospfd/kroute.c | |
parent | fc3b79bd22d9dfb786817d53e5e2ab6cdfcf1787 (diff) |
From ripd: Add missing RTM_VERSION checks
Diffstat (limited to 'usr.sbin/ospfd/kroute.c')
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index f352a754929..b46fa3001c9 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.54 2007/10/01 08:35:12 norby Exp $ */ +/* $OpenBSD: kroute.c,v 1.55 2007/10/17 20:52:42 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -1166,6 +1166,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); @@ -1346,6 +1348,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; prefix.s_addr = 0; prefixlen = 0; |