From 2666caae11db3d5e9761ef15bf6e214a9ca51af8 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 d03bd9b3..b660a1bb 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1477,8 +1477,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.30.2