diff options
author | peter <peter@FreeBSD.org> | 1996-08-24 03:11:13 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-08-24 03:11:13 +0000 |
commit | ee3725a1c173b071322f7e3fa3fb70de6f6e41d2 (patch) | |
tree | 534a9af5539b351c82abe7bec6fd30dea0c9d398 | |
parent | a92fa815a60a804cdecd13d630d1aca84a2807cd (diff) | |
download | FreeBSD-src-ee3725a1c173b071322f7e3fa3fb70de6f6e41d2.zip FreeBSD-src-ee3725a1c173b071322f7e3fa3fb70de6f6e41d2.tar.gz |
route.c:RTM_ADD does not check for a netmask before doing a tree walk
like it does elsewhere. This is probably only happens when incorrect
args are given to route(8), or when running with non-IPv4 stacks but
incorrect args to the route command is no excuse for panicing!
Submitted by: Michael Clay <mclay@weareb.org>, PR#1532
-rw-r--r-- | sys/net/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 363a741..df276ea 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)route.c 8.2 (Berkeley) 11/15/93 - * $Id: route.c,v 1.33 1996/03/29 08:02:30 fenner Exp $ + * $Id: route.c,v 1.34 1996/07/10 01:34:35 fenner Exp $ */ #include "opt_mrouting.h" @@ -535,7 +535,7 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt) * it doesn't fire when we call it there because the node * hasn't been added to the tree yet. */ - if (!(rt->rt_flags & RTF_HOST)) { + if (!(rt->rt_flags & RTF_HOST) && rt_mask(rt) != 0) { struct rtfc_arg arg; arg.rnh = rnh; arg.rt0 = rt; |