From jc@irbs.com  Mon Apr 21 11:02:10 1997
Received: from irbs.irbs.com (jc@irbs.irbs.com [199.182.75.129])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA03588
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Apr 1997 11:02:08 -0700 (PDT)
Received: (from jc@localhost)
	by irbs.irbs.com (8.8.5/8.8.5) id OAA10624;
	Mon, 21 Apr 1997 14:02:04 -0400 (EDT)
Message-Id: <199704211802.OAA10624@irbs.irbs.com>
Date: Mon, 21 Apr 1997 14:02:04 -0400 (EDT)
From: John Capo <jc@irbs.com>
Reply-To: jc@irbs.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: 2.1.7.1 panic with route mask == 0
X-Send-Pr-Version: 3.2

>Number:         3367
>Category:       kern
>Synopsis:       2.1.7.1 panic with route mask == 0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 21 11:10:00 PDT 1997
>Closed-Date:    Sun Aug 24 20:28:22 MEST 1997
>Last-Modified:  Sun Aug 24 20:28:41 MEST 1997
>Originator:     John Capo
>Release:        FreeBSD 2.1.7.1-RELEASE i386
>Organization:
IRBS Engineering
>Environment:

2.[01] kernel

>Description:

I managed to get a bogus route added via /etc/ppp/ppp.conf that
caused a panic due to the mask associated with the route being 0.

>How-To-Repeat:

It's been a while and I didn't make notes at the time.

>Fix:

Same fix is in 2.2.

Index: route.c
===================================================================
RCS file: /usr/cvs/src/sys/net/route.c,v
retrieving revision 1.23.4.3
diff -u -r1.23.4.3 route.c
--- route.c	1996/06/08 02:02:03	1.23.4.3
+++ route.c	1997/03/16 02:00:25
@@ -511,7 +511,7 @@
 		 * 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;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Sun Aug 24 20:28:22 MEST 1997 
State-Changed-Why:  

Suggested fix applied in rev 1.23.4.4, thanks. 
>Unformatted:
