diff options
author | Peter Wemm <peter@FreeBSD.org> | 1996-08-24 03:11:13 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1996-08-24 03:11:13 +0000 |
commit | 3271a3a4f3191638a3dd2b8c167902d8bd810428 (patch) | |
tree | 534a9af5539b351c82abe7bec6fd30dea0c9d398 /sys | |
parent | 47be7466820531714ef45de9fc2ac01c47cb6759 (diff) | |
download | src-3271a3a4f3191638a3dd2b8c167902d8bd810428.tar.gz src-3271a3a4f3191638a3dd2b8c167902d8bd810428.zip |
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
Notes
Notes:
svn path=/head/; revision=17802
Diffstat (limited to 'sys')
-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 363a741a9275..df276eaf4313 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; |