From df637878e9a48da3139cf594488909e0d568ec14 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 17 Oct 2007 20:52:43 +0000 Subject: From ripd: Add missing RTM_VERSION checks --- usr.sbin/ospfd/kroute.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ospfd/kroute.c') 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 @@ -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; -- cgit v1.2.3