From: Gustau Perez Subject: [PATCH] Do not assume mtu the mtu of xnb and mtu interfaces on FreeBSD. Date: Mon, 20 Apr 2015 09:12:52 +0200 Message-ID: <1429513972-3834-1-git-send-email-gustau.perez@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yk5t6-0005eT-Mr for xen-devel@lists.xenproject.org; Mon, 20 Apr 2015 07:13:00 +0000 Received: by wgin8 with SMTP id n8so168236187wgi.0 for ; Mon, 20 Apr 2015 00:12:59 -0700 (PDT) List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Gustau Perez , roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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