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
This commit is contained in:
Peter Wemm 1996-08-24 03:11:13 +00:00
parent 47be746682
commit 3271a3a4f3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17802

View File

@ -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;