ofport_modified(port, &pp);
}
- /* If this is a non-internal port and the MTU changed, check
- * if the datapath's MTU needs to be updated. */
- if (strcmp(netdev_get_type(netdev), "internal")
- && !netdev_get_mtu(netdev, &dev_mtu)
- && port->mtu != dev_mtu) {
- set_internal_devs_mtu(ofproto);
+ if (!netdev_get_mtu(netdev, &dev_mtu) &&
+ port->mtu != dev_mtu) {
port->mtu = dev_mtu;
+ set_internal_devs_mtu(ofproto);
}
/* Install the newly opened netdev in case it has changed.
if (!strcmp(netdev_get_type(netdev), "internal")) {
netdev_set_mtu(netdev, mtu);
+ ofport->mtu = mtu;
}
}
}