diff options
author | Ben Pfaff <blp@nicira.com> | 2012-03-12 12:59:47 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-03-12 13:26:00 -0700 |
commit | 620257a3114c85ab3baf45af8b098dfba0e70d91 (patch) | |
tree | 92a2608beebffd4eda9d96a71cb24e1fc0e7c84b | |
parent | f00731ddfaa6b1cee19b60b5342d2d8b74db57a7 (diff) |
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 <blp@nicira.com>
-rw-r--r-- | ofproto/ofproto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index f6cb806f..a77063a9 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; } |