From owner-freebsd-hackers Mon Jan 27 19:32:36 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA13608 for hackers-outgoing; Mon, 27 Jan 1997 19:32:36 -0800 (PST) Received: from cheops.anu.edu.au (avalon@cheops.anu.edu.au [150.203.76.24]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA13531 for ; Mon, 27 Jan 1997 19:32:10 -0800 (PST) Message-Id: <199701280332.TAA13531@freefall.freebsd.org> Received: by cheops.anu.edu.au (1.37.109.16/16.2) id AA164182291; Tue, 28 Jan 1997 14:31:31 +1100 From: Darren Reed Subject: Re: Network interfaces: removal of. To: julian@whistle.com (Julian Elischer) Date: Tue, 28 Jan 1997 14:31:31 +1100 (EDT) Cc: hackers@freebsd.org In-Reply-To: <32ED4558.446B9B3D@whistle.com> from "Julian Elischer" at Jan 27, 97 04:16:24 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In some mail from Julian Elischer, sie said: > > I have a system with frame relay interfaces, and virtual circuits > are reflected by virtual 'interfaces' e.g vc0, vc2 > etc. > > the trouble is that there is no support in the kernel for REMOVING > an interface! > > does anyone have any ideas on this? Hmmm, I once modified the "if_vsr" LKM to be unloadable as an exercise on SunOS4...but even then... > removal of an interface requires that the interface addresses > be freed. this in turn requires that any routes that access that > ifa (e.g in a TCP pcb) discover that it is invalid the next time they > try use it, and try get a new rtentry/ifa. Yup. I did all that myself. Worst part is that it needs to be splimp(). > None of this happens at the moment. > > Add to that the fact that the linked list of interfaces has no support > for removing entries, and that the interface array has no support for > re-using entries. Unless it is all done manually. > The reference counting on rtentries and IFAs is next to useless > as so many places don't use them rigorously, which requires > hacks to keep them allingned with anything even close to reality.. Don't bother. > Is there anyone in the group who feels as though they understand the > situation well enough to work with me in trying to clean this up a bit? There's a few tips, but I worked under a much narrower operational conditions (i.e. I could make sure all the programs using the vif were dead, etc, before I unloaded). There may be a version of that or a more hacked version of it that works better somewhere on the 'net. Darren