From ee3725a1c173b071322f7e3fa3fb70de6f6e41d2 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 24 Aug 1996 03:11:13 +0000 Subject: 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 , PR#1532 --- sys/net/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net') 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; -- cgit v1.1