diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-13 16:50:59 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-13 16:50:59 +0000 |
commit | dd6c6035ee79aded26a8ec69ed83e7df14d58c4f (patch) | |
tree | 2b72a4771479e4973a537590e840c960709a0566 | |
parent | 2e063390807faa5f1b687ba3d47fe61cef81cd61 (diff) |
Same problem as in ospfd's kroute.c don't check rtm_tableid without verifying
that rtm_type is one of RTM_ADD, RTM_CHANGE or RTM_DELETE.
-rw-r--r-- | usr.sbin/ripd/kroute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ripd/kroute.c b/usr.sbin/ripd/kroute.c index a67848b4c22..e07cc9a194d 100644 --- a/usr.sbin/ripd/kroute.c +++ b/usr.sbin/ripd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.5 2006/11/28 19:21:15 reyk Exp $ */ +/* $OpenBSD: kroute.c,v 1.6 2007/03/13 16:50:58 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -997,14 +997,14 @@ dispatch_rtmsg(void) flags = F_KERNEL; nexthop.s_addr = 0; - if (rtm->rtm_tableid != 0) - continue; - if (rtm->rtm_type == RTM_ADD || rtm->rtm_type == RTM_CHANGE || rtm->rtm_type == RTM_DELETE) { sa = (struct sockaddr *)(rtm + 1); get_rtaddrs(rtm->rtm_addrs, sa, rti_info); + if (rtm->rtm_tableid != 0) + continue; + if (rtm->rtm_pid == kr_state.pid) /* cause by us */ continue; |