Sebastien Roy wrote:

> Darren Reed wrote:
>
>> In all cases the output of a successful run of dladm like this
>> should include the interface name just created, so that we can
>> do something like:
>>
>> nicname=$(dladm create-iptun -s foo -d bar auto|cut -f1 -d' ') 
>
>
> David Edmondson wrote:
>
>> Requiring a link name as an argument pushes (some of) the burden of
>> managing the link namespace onto the caller.  This is an irritation,
>> as the caller has to deal with collisions, racing creators, etc.
>>
>> Replicate that code in a couple of places and you're pretty sure to
>> end up with brokenness in one of them.
>>
>> I'd _much_ rather have (the option of) the tools choose a name.
>
>
> I think you both make some good points.  I can see the benefit of 
> having the system choose a name if that's going to make the 
> developer's job easier.


Yes and David's point about race conditions and collisions was
behind my thinking of having the instance number, at the very
least, be optionally allocated by the kernel.

So if I go:

dladm create-iptun ... punchin0

i can get an error if punchin0 exists, but if I do:

dladm create-iptun ... punchin

it may create a punchin1 for me if punchin0 exists
and there is no punchin1.

Darren


Reply via email to