Re: [libvirt] [PATCH] lxc: fix veth off by 1 error

2009-04-08 Thread Daniel P. Berrange
On Tue, Apr 07, 2009 at 04:21:39PM -0500, Serge E. Hallyn wrote: When not specifying a target for veth device, veth.c:getFreeVethName() is supposed to scan for unused veth devices in /sys/class/net. However, when it finds one, it bumps the index by one before returning it. So, if you have

[libvirt] [PATCH] lxc: fix veth off by 1 error

2009-04-07 Thread Serge E. Hallyn
When not specifying a target for veth device, veth.c:getFreeVethName() is supposed to scan for unused veth devices in /sys/class/net. However, when it finds one, it bumps the index by one before returning it. So, if you have one container running, veth0 is passed into the container, veth1 is