From aaaff75e5b03386581c1d89064c20d126b9141fc Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 12 Mar 2012 12:59:47 -0700 Subject: [PATCH] ofproto: Fix code that keeps track of MTU. ofport_install() should set the MTU that it finds into the ofport before calling set_internal_devs_mtu(), because the latter function might change the MTU and update ofport->mtu and the caller should not incorrectly overwrite its changes. Signed-off-by: Ben Pfaff --- ofproto/ofproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 8ff552cf9..38a91d861 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1301,8 +1301,8 @@ ofport_install(struct ofproto *p, shash_add(&p->port_by_name, netdev_name, ofport); if (!netdev_get_mtu(netdev, &dev_mtu)) { - set_internal_devs_mtu(p); ofport->mtu = dev_mtu; + set_internal_devs_mtu(p); } else { ofport->mtu = 0; } -- 2.43.0