tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Specifying names for tap interfaces



On 21/06/2012 2:42 AM, Roger Pau Monne wrote:
> Manuel Bouyer wrote:
>> On Thu, Jun 21, 2012 at 12:24:48AM +1000, Darren Reed wrote:
>>> [...]
>>> The first issue that you face that for all intents and purposes, you
>>> cannot change "struct ifnet" because it is in too many places and
>>> change will likely have a huge waterfall effect. So that can't be
>>> changed.
>>
>> that's not true. struct ifnet can and has been changed, the last
>> time was 2011/10/19.
>> But this will likely cause ABI issues; if this has to be pulled up to 
>> netbsd-6
>> and/or netbsd-5, this needs to be carefully examinated.
>>
> 
> There has been a lot of chat here, but I think the general idea is that the
> FreeBSD way of changing interface names is not acceptable on NetBSD. I was
> halfway on doing that change to NetBSD.
> 
> So, we would like to be able to create interface alias, here is what I think
> should be doable (from my PoV):
>
> Adding a field to ifnet to contain that alias, ..

No, this is not the right approach and I don't think that a short cut
solution like this belongs in NetBSD.

As you noticed, this requires changes to other utilities in order to work.

If your project requires any changes to brconfig, netstat, ifconfig, ipf,
npf, tcpdump, etc, then you've got the wrong solution in hand. Each network
interface should have one name and one name only as far as userland is
concerned. If there are userland programs (aside from device management)
that need to be worried about aliases then you've got the wrong solution.
That sentence just prior should be the litmus test for your design.

I suppose there's one other issue that needs to be resolved and that is
when can an interface be renamed. It might be perfectly acceptable to
say that an interface can only have its name changed whilst it has no
IPv4 addresses assigned to it and only the link-local IPv6 address.
Or maybe it will be ok to allow devices to be renamed when addresses
are present and configured.

Darren


Home | Main Index | Thread Index | Old Index