Subject: Re: lo(4) as a clonable interface
To: None <tech-net@NetBSD.org>
From: Peter Postma <peter@pointless.nl>
List: tech-net
Date: 07/23/2004 22:20:59
On Fri, Jul 23, 2004 at 09:58:22PM +0200, Quentin Garnier wrote:
> I made a similar patch a while ago, but then got discouraged by the uses
> of loif[0], mostly in the INET6 code.  I think your patch (as mine did)
> makes those uses even more hacky than they currently are, so I don't see
> the overall benefit.
> 
> I'd like to see the loif[0] uses fixed somehow, they seems wrong to me.

Hmmm, I've been thinking about making the loop interface mandatory and
remove it from the kernel config. There are many places where the code
assumes to have a loop interface (like in inet6 code). And the kernel
doesn't even compile without 'pseudo-device loop'...

> 
> Apart from that, the only things I'd change in your patch are the use of
> malloc().  You can just use M_ZERO to avoid the following call to memset,
> and you don't need to check for the return value:  malloc either succeeds
> or panics.

Thanks, this has been fixed.

-- 
Peter Postma