diff options
author | Ben Pfaff <blp@nicira.com> | 2014-02-20 12:13:26 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-02-20 12:25:04 -0800 |
commit | 97eba824fca691f4c18a4e3eb08fb1b4b22e07ef (patch) | |
tree | e1212fa0c044f9bbbb26c3b9a83b9013ef2b1f93 | |
parent | 40ad4571220f7fe6227c9008b76241e564e2daea (diff) | |
download | openvswitch-97eba824fca691f4c18a4e3eb08fb1b4b22e07ef.tar.gz |
ofproto: Update only OFPUTIL_PS_LINK_DOWN (not STP) from netdev state.
When a netdev indicates that its state or configuration has changed,
update_port() updates the OpenFlow port to match the changes. However,
this was being taken too far: a netdev does not have an STP state, and a
state change was resetting the STP state of the port. This fixes the
problem.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reported-by: Vasu Dasari <vdasari@gmail.com>
Tested-by: Vasu Dasari <vdasari@gmail.com>
-rw-r--r-- | ofproto/ofproto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 790aa71e9..13c20b3e2 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2103,7 +2103,8 @@ ofport_modified(struct ofport *port, struct ofputil_phy_port *pp) memcpy(port->pp.hw_addr, pp->hw_addr, ETH_ADDR_LEN); port->pp.config = ((port->pp.config & ~OFPUTIL_PC_PORT_DOWN) | (pp->config & OFPUTIL_PC_PORT_DOWN)); - port->pp.state = pp->state; + port->pp.state = ((port->pp.state & ~OFPUTIL_PS_LINK_DOWN) + | (pp->state & OFPUTIL_PS_LINK_DOWN)); port->pp.curr = pp->curr; port->pp.advertised = pp->advertised; port->pp.supported = pp->supported; |