From 620257a3114c85ab3baf45af8b098dfba0e70d91 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 f6cb806f6..a77063a93 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1357,8 +1357,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