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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user