On 05/30/2012 09:35 AM, Papp Tamas wrote:
> On 05/30/2012 04:28 AM, Daniel Lezcano wrote:
>>
>> On 05/29/2012 10:10 PM, Papp Tamas wrote:
>>> On 05/29/2012 07:29 PM, Daniel Lezcano wrote:
>>>>
>>>> On 05/29/2012 03:48 PM, Papp Tamas wrote:
>>>>> hi All,
>>>>>
>>>>>
>>>>> This doesn't work now:
>>>>>
>>>>> ioctl(3, SIOCGIFNAME, {ifr_index=0, ifr_name=???}) = -1 ENODEV (No
>>>>> such
>>>>> device)
>>>>>
>>>>>
>>>>> Is there any way to make it work?
>>>>
>>>> Yep, the index are not virtualized. So ifr_index=0 is for the
>>>> loopback in the init network namespace.
>>>
>>> So there is no way?
>>
>> What do you want to do exactly ?
>
>
> There is a license server and the license depends on the MAC address
> what is determined in this way. Of course I cannot modify the code or
> replace it with alternatives.

I am afraid the code is buggy because it plays with the interface
indexes assuming they will be always +1 and beginning with index 0 which
is not true.
I "assume" if you have your host with two network interfaces, so we have
indexes 0, 1, 2, and you unload the module for interface with index 1,
the license server will fail in the same way. Or you create several
virtual interfaces and then you load the physical network interface
module and destroy the virtual devices making a hole in the index
interval will lead to the same problem.

The correct way for this legacy interface is to use SIOCGIFCONF and then
use SIOCGIFHWADDR with the interface name. This is what does the
ifconfig command and it works well.

In the era of virtual network interfaces, this legacy code is broken
because it was written with stupid assumptions in mind. I know that does
not help you but it is an application bug.



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to