Commit 040de846 authored by Leigh B Stoller's avatar Leigh B Stoller

Watch for a gre interface inside a container, and set the MTU to

1450. Note that inside a container, we get back regular interface
lines cause all the container sees is a plain interface, but we have
to reduce the MTU.
parent 0ea91f4a
......@@ -416,6 +416,17 @@ sub os_ifconfig_line($$$$$$$$;$$$)
my ($miirest, $miisleep, $miisetspd, $media);
my ($uplines, $downlines);
#
# Inside a container, we get a regular interface, but tmcd sets the
# type=gre so we know to set the MTU properly. This number seems to
# work for both openvz and xen containers.
#
if ($iface_type eq "gre" && GENVNODE()) {
$uplines = "$IFCONFIGBIN $iface $inet netmask $mask mtu 1450 up";
$downlines = "$IFCONFIGBIN $iface down";
return ($uplines, $downlines);
}
#
# Special handling for new style interfaces (which have settings).
# This should all move into per-type modules at some point.
......
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