From root@genabsd.netvision.net.il  Wed Mar 22 13:21:50 1995
Received: from dns.netvision.net.il (root@dns.NetVision.net.il [194.90.1.5]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA15170 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Mar 1995 13:21:34 -0800
Received: from genabsd.netvision.net.il (ts2p1.NetVision.net.il [194.90.1.121]) by dns.netvision.net.il (8.6.10/8.6.9) with ESMTP id XAA10993 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Mar 1995 23:20:07 +0200
Received: (from root@localhost) by genabsd.netvision.net.il (8.6.9/8.6.9) id WAA00227; Wed, 22 Mar 1995 22:19:22 +0200
Message-Id: <199503222019.WAA00227@genabsd.netvision.net.il>
Date: Wed, 22 Mar 1995 22:19:22 +0200
From: Charlie Root <root@genabsd.netvision.net.il>
Reply-To: root@genabsd.netvision.net.il
To: FreeBSD-gnats-submit@freebsd.org
Subject: machine hangs when closing ppp
X-Send-Pr-Version: 3.2

>Number:         269
>Category:       kern
>Synopsis:       Insufficient exit conditions in rn_walktree_from()
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    wollman
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 22 13:30:02 1995
>Closed-Date:    Fri Mar 24 07:48:22 PST 1995
>Last-Modified:
>Originator:     Charlie &
>Release:        FreeBSD 2.1.0-Development i386
>Organization:
NetVision
>Environment:

kernel supped last night

FreeBSD genabsd.netvision.net.il 2.1.0-Development FreeBSD 2.1.0-Development #0: Tue Mar 21 21:14:43 IST 1995     root@genabsd.netvision.net.il:/usr/src/sys/compile/GENABSD  i386

#
# GENABSD - kernel for Gena's home computer
#
#	GENABSD,v 1.5 1995/02/09 15:55:00 gena Exp
#

machine		"i386"
cpu		"I486_CPU"
ident		GENABSD
maxusers	5

options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		MSDOSFS			#MSDOS Filesystem
options		PROCFS			#Process filesystem
options		"CD9660"		#ISO 9660 file system
options		"COMPAT_43"		#Compatible with BSD 4.3
options		UCONSOLE		#X Console support

options		BOUNCE_BUFFERS		#include support for DMA bounce buffers
options		"AUTO_EOI_1"
options		"AUTO_EOI_2"
options		DUMMY_NOPS
options		GATEWAY
options		TUN

options		DODUMP

options		SYSVSHM
options		SYSVSEM
options		SYSVMSG

config		kernel	root on wd0 swap on wd0 dumps on wd0

controller	isa0

controller	fdc0	at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk		fd0	at fdc0 drive 0
disk		fd1	at fdc0 drive 1

controller	wdc0	at isa? port "IO_WD1" bio irq 14 vector wdintr
disk		wd0	at wdc0 drive 0
disk		wd1	at wdc0 drive 1

controller	aic0    at isa? port 0x140 bio irq 12 vector aicintr
controller	scbus0

device		cd0	#SCSI CD-ROM

device		sc0	at isa? port "IO_KBD" tty irq 1 vector scintr
device		npx0	at isa? port "IO_NPX" irq 13 vector npxintr

device		sio0	at isa? port "IO_COM1" tty irq 4 vector siointr
device		sio1	at isa? port "IO_COM2" tty irq 3 vector siointr
device		sio2	at isa? port "IO_COM3" tty irq 5 vector siointr

device		lpt0	at isa? port? tty irq 7 vector lptintr

device		pca0	at isa? tty

controller	snd0
device opl0	at isa? port 0x388
device sb0	at isa? port 0x220 irq 10 drq 1 vector sbintr
device sbxvi0	at isa? drq 5
device sbmidi0	at isa? port 0x330

pseudo-device	loop
pseudo-device	log
pseudo-device	ppp	2
pseudo-device	tun	1
pseudo-device	pty	16
pseudo-device	speaker
pseudo-device	gzip		# Exec gzipped a.out's

>Description:

PPP ( /usr/sbin/ppp on tun0 ) works and copnnects fine.
Howewer when i try to terminate connection with "close" command
machine hangs ( no panic :-( ) .

>How-To-Repeat:

Connect using /usr/sbin/ppp to any site
and then try to terminate connection with "close"

>Fix:

 Donno, the problem is probably related to the latest changes
in if_tun.c ( support for lkm was added ).
Also i haven't seen this problem on kernel supped 3-4 days ago.

	
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: wollman 
State-Changed-When: Wed Mar 22 13:53:25 PST 1995 
State-Changed-Why:  
I think I know what's wrong.  My fix, per mail to the -bugs list, was: 

Try changing the code in net/radix.c:rn_walktree_from() which currently 
looks like this: 

/* if went up beyond last, stop */ 
if (rn->rn_b < lastb) { 
stopping = 1; 
} 
to this: 

/* if went up beyond last, stop */ 
if (rn->rn_b < lastb || (rn->rn_flags & RNF_ROOT)) { 
stopping = 1; 
} 

(I introduced the bug.) 


Responsible-Changed-From-To: freebsd-bugs->wollman 
Responsible-Changed-By: wollman 
Responsible-Changed-When: Wed Mar 22 13:53:25 PST 1995 
Responsible-Changed-Why:  
I'm working on it. 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: wollman 
State-Changed-When: Thu Mar 23 10:50:21 PST 1995 
State-Changed-Why:  
Should be fixed by rev 1.20 of route.c and 1.7 of radix.c. 
State-Changed-From-To: feedback->closed 
State-Changed-By: wollman 
State-Changed-When: Fri Mar 24 07:48:22 PST 1995 
State-Changed-Why:  
Proposed change did indeed fix the problem. 
>Unformatted:





