Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ofproto: update mtu when port is getting removed as well
When we're adding the port into ovs bridge, its mtu is updated to the minimal mtu of the included port. But when the port is getting removed, no such update is performed, which leads to bug. For example, when the port with minimal mtu is removed, bridge's mtu must adapt to new value, but it won't happen. How to reproduce the problem: $ ovs-vsctl add-br testing $ ip link add name gretap11 type gretap local 10.0.0.1 remote 10.0.0.100 $ ip link add name gretap12 type gretap local 10.0.0.1 remote 10.0.0.200 $ ip link set dev gretap12 mtu 1600 $ ovs-vsctl add-port testing gretap11 $ ovs-vsctl add-port testing gretap12 $ ip a sh testing 16: testing: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1 link/ether 7a:42:95:00:96:40 brd ff:ff:ff:ff:ff:ff $ ovs-vsctl del-port gretap11 $ ip a sh testing 16: testing: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1 link/ether 7a:42:95:00:96:40 brd ff:ff:ff:ff:ff:ff $## as we can see here, 'testing' bridge mtu is stuck, while it must adapt to new '1600' value, $## cause there is only one port 'gretap12' left, and it's mtu is '1600': $ ip a sh gretap12 19: gretap12@NONE: <BROADCAST,MULTICAST> mtu 1600 qdisc noop master ovs-system state DOWN group default qlen 1000 link/ether b2:c6:1d:9f:be:0d brd ff:ff:ff:ff:ff:ff My commit fixes this problem - mtu update is performed on port removal as well. Signed-off-by: wisd0me <[email protected]> Signed-off-by: Daniele Di Proietto <[email protected]>
- Loading branch information