diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 15:54:23 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-06-25 15:54:23 +0000 |
commit | 08bfe13883ee11a329b67cb949a592a1f57f24ab (patch) | |
tree | 6d217e93ae2c4d7788d4116f458bab826e10d7a8 /usr.sbin/bgpd | |
parent | e9ac9dbec23f3334c34cbb19029291322d367c96 (diff) |
Add missing RTM_VERSION checks. Bad me, no cockies.
Tested and OK sthen@, OK henning@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index e6d2043672f..d16cf3b4156 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.168 2009/06/12 16:42:53 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.169 2009/06/25 15:54:22 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2184,6 +2184,8 @@ fetchtable(u_int rtableid, int connected_only) 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); @@ -2409,6 +2411,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; switch (rtm->rtm_type) { case RTM_ADD: |