Commit fb6d9b2f by Daniel Lezcano Committed by Daniel Lezcano

keep the name of the physical interface

When the interface used in the container is a physical interface from the host, we keep the initial name. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com> Reported-by: 's avatarSabdar <sabdar@wellspringsys.com>
parent bac89583
...@@ -1025,7 +1025,8 @@ static int setup_netdev(struct lxc_netdev *netdev) ...@@ -1025,7 +1025,8 @@ static int setup_netdev(struct lxc_netdev *netdev)
/* default: let the system to choose one interface name */ /* default: let the system to choose one interface name */
if (!netdev->name) if (!netdev->name)
netdev->name = "eth%d"; netdev->name = netdev->type == LXC_NET_PHYS ?
netdev->link : "eth%d";
/* rename the interface name */ /* rename the interface name */
err = lxc_device_rename(ifname, netdev->name); err = lxc_device_rename(ifname, netdev->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment