Skip to content

Commit

Permalink
rstp: Increment the rstp port num counter.
Browse files Browse the repository at this point in the history
This counter is supposed to prevent having too many RSTP ports, but nothing
ever incremented it.

Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
xpu22 authored and blp committed May 31, 2017
1 parent c1384b0 commit daf7319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vswitchd/bridge.c
Expand Up @@ -1407,6 +1407,10 @@ port_configure_rstp(const struct ofproto *ofproto, struct port *port,
port_s->port_num = 0;
}

/* Increment the port num counter, because we only support
* RSTP_MAX_PORTS rstp ports. */
(*port_num_counter)++;

config_str = smap_get(&port->cfg->other_config, "rstp-path-cost");
if (config_str) {
port_s->path_cost = strtoul(config_str, NULL, 10);
Expand Down

0 comments on commit daf7319

Please sign in to comment.