[Lxc-users] SIOCGIFNAME
Papp Tamas
tompos at martos.bme.hu
Wed May 30 08:24:14 UTC 2012
On 05/30/2012 10:14 AM, Daniel Lezcano wrote:
> 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.
Good news:)
Thank you,
tamas
More information about the lxc-users
mailing list