dpif-netdev: Update max_mtu correctly.
authorBen Pfaff <blp@nicira.com>
Fri, 26 Apr 2013 18:35:43 +0000 (11:35 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 29 Apr 2013 20:54:57 +0000 (13:54 -0700)
What a dumb bug.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/dpif-netdev.c

index e4a2f75..6838800 100644 (file)
@@ -412,7 +412,7 @@ do_add_port(struct dp_netdev *dp, const char *devname, const char *type,
     port->type = xstrdup(type);
 
     error = netdev_get_mtu(netdev, &mtu);
-    if (!error) {
+    if (!error && mtu > max_mtu) {
         max_mtu = mtu;
     }