mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 17:18:56 +00:00
conf: try to retrieve mtu from veth
When the mtu cannot be retrieved from netdev->link try from veth device. Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
This commit is contained in:
parent
e9280f6590
commit
729e8bf685
@ -2577,10 +2577,13 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
|
|||||||
INFO("Retrieved mtu %d", mtu);
|
INFO("Retrieved mtu %d", mtu);
|
||||||
} else if (netdev->link) {
|
} else if (netdev->link) {
|
||||||
bridge_index = if_nametoindex(netdev->link);
|
bridge_index = if_nametoindex(netdev->link);
|
||||||
if (!bridge_index)
|
if (bridge_index) {
|
||||||
INFO("Could not retrieve mtu from %s", netdev->link);
|
|
||||||
mtu = netdev_get_mtu(bridge_index);
|
mtu = netdev_get_mtu(bridge_index);
|
||||||
INFO("Retrieved mtu %d from %s", mtu, netdev->link);
|
INFO("Retrieved mtu %d from %s", mtu, netdev->link);
|
||||||
|
} else {
|
||||||
|
mtu = netdev_get_mtu(netdev->ifindex);
|
||||||
|
INFO("Retrieved mtu %d from %s", mtu, veth2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mtu) {
|
if (mtu) {
|
||||||
|
Loading…
Reference in New Issue
Block a user