[lxc-devel] segfault with insufficient network config
Daniel Lezcano
dlezcano at fr.ibm.com
Thu Jul 22 19:52:03 UTC 2010
On 07/22/2010 09:44 PM, Ferenc Wagner wrote:
> Hi,
>
> $ lxc-execute --name net -s lxc.network.type=phys bash
> Segmentation fault (core dumped)
>
> The problem is that the netdev structure is mostly uninitialized (only
> its type is set to LXC_NET_PHYS), so if_nametoindex() is invoked with a
> NULL argument:
>
> static int instanciate_phys(struct lxc_netdev *netdev)
> {
> netdev->ifindex = if_nametoindex(netdev->link);
>
> That would be easy to fix by starting with
>
> if (!netdev->link) {
> ERROR("no link specified for phy netdev");
> return -1;
> }
>
Oops, right.
> or similar, but there's something else, too:
>
> # lxc-execute --name net -s lxc.network.type=phys -s lxc.network.link=eth0 bash
> lxc-execute: failed to move 'eth0' to the container : Message too long
>
> It might as well have some sense, but I definitely don't get it this
> late. :) I give up now.
I think the error is wrong, perhaps the kernel is returning a wrong
value or there is a bad error catch in lxc. But I think the problem may
come from the kernel version < 2.6.35 because it does not support
physical interface moving across namespace. Is it a kernel < 2.6.35 ?
More information about the lxc-devel
mailing list