On creation time, tap and xnb interfaces are created with an mtu of
1500 bytes, assuming the bridge will have the same value.
Instead, check the bridge mtu and configure the new xnb or
tap interface with the same value.
The tools used are sed and ifconfig, both included on base. No need
to install additional ports (no new dependences).
Signed-off-by: Gustau Perez <gustau.perez@gmail.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.cmapbell@citrix.com>
[ ijc -- clarified title ]
case $action in
add)
bridge=$(xenstore-read "$path/bridge")
+ mtu=$(ifconfig $bridge | sed -n 's/.*mtu \([0-9]*\)$/\1/p')
+ ifconfig $iface_dev mtu $mtu
ifconfig $bridge addm $iface_dev
ifconfig $iface_dev up
exit 0