2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 05:29:37 +00:00

Set up MTU for vlan-type interfaces.

Signed-off-by: Vitaly Lavrov <vel21ripn@gmail.com>
This commit is contained in:
Vitaly Lavrov
2016-06-30 20:04:49 +03:00
parent df5512e5df
commit b4fb7de1b6

View File

@@ -2741,6 +2741,15 @@ static int instantiate_vlan(struct lxc_handler *handler, struct lxc_netdev *netd
DEBUG("instantiated vlan '%s', ifindex is '%d'", " vlan1000",
netdev->ifindex);
if (netdev->mtu) {
err = lxc_netdev_set_mtu(peer, atoi(netdev->mtu));
if (err) {
ERROR("failed to set mtu '%s' for %s : %s",
netdev->mtu, peer, strerror(-err));
lxc_netdev_delete_by_name(peer);
return -1;
}
}
return 0;
}