Subject: Re: proposed fix for stray ifnet pointers from interface deletion
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-net
Date: 07/13/2005 07:33:01
In article <rmieka3516y.fsf_-_@fnord.ir.bbn.com>,
Greg Troxel  <gdt@ir.bbn.com> wrote:
>I wrote earlier about crashes due to stray ifnet pointers and
>interface deletion (pppd), and filed a PR:
>
>  http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=29580
>
>I've cleaned up the patch a bit and would like to commit it and am
>soliciting comments first.  I compiled this Monday's current with the
>patch, and have run it on a normal i386 box with no coming/going
>interfaces, with ifconfig gif0 destroy (with quagga/ospfd running on
>gif0), and on a laptop with a wi(4) that I ejected while quagga/ospfd
>was running on it.  I've been running with essentially this patch
>against 2.99.15 on two machines with a ppp link and they no longer
>crash when the line goes down.
>
>Further cleanups are probably in order: adding PRU_PURGEIF on other
>protocols that can store ifnet pointers, and perhaps not running the
>first purge on interfaces with addresses - since it has to be done
>anyway.  But, I'm trying  to make a conservative change, looking
>forward to requesting a pullup for netbsd-3 and probably netbsd-2.

This looks fine to me Greg. Thanks for following up on it.

christos