From: Gustau Perez Date: Mon, 20 Apr 2015 07:12:52 +0000 (+0200) Subject: hotplug/FreeBSD: set network interface MTU to bridge MTU X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3386 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1d5614db07b05af81f2f3a78fc563b6e2f3e1389;p=xen.git hotplug/FreeBSD: set network interface MTU to bridge MTU 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 Acked-by: Roger Pau Monné Acked-by: Wei Liu Acked-by: Ian Campbell [ ijc -- clarified title ] --- diff --git a/tools/hotplug/FreeBSD/vif-bridge b/tools/hotplug/FreeBSD/vif-bridge index d350df4ce2..062b20a8fa 100644 --- a/tools/hotplug/FreeBSD/vif-bridge +++ b/tools/hotplug/FreeBSD/vif-bridge @@ -22,6 +22,8 @@ action=$2 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