• R
    LXC allow container to have ethN interfaces · 8db32571
    Ryota Ozaki 提交于
    Current implementation of lxc driver creates vethN named
    interface(s) in the host and passes as it is to a container.
    The reason why it doesn't use ethN is due to the limitation
    that one namespace cannot have multiple iterfaces that have
    an identical name so that we give up creating ethN named
    interface in the host for the container.
    
    However, we should be able to allow the container to have
    ethN by changing the name after clone(CLONE_NEWNET).
    
    * src/lxc/lxc_container.c src/lxc/veth.c src/lxc/veth.h: do the clone
      and then renames interfaces eth0 ... ethN to keep the interface names
      familiar in the domain
    8db32571
lxc_container.c 23.6 KB