[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Do not assume mtu the mtu of xnb and mtu interfaces on FreeBSD.



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@xxxxxxxxx>
---
 tools/hotplug/FreeBSD/vif-bridge | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/hotplug/FreeBSD/vif-bridge b/tools/hotplug/FreeBSD/vif-bridge
index d350df4..062b20a 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
-- 
2.3.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.