mirror of
git://github.com/lxc/lxc
synced 2025-09-01 17:29:30 +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",
|
DEBUG("instantiated vlan '%s', ifindex is '%d'", " vlan1000",
|
||||||
netdev->ifindex);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user