Message ID | 1494414906-71269-4-git-send-email-nic@opencloud.tech |
---|---|
State | Changes Requested |
Headers | show |
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 31203d1..86b7c11 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1485,6 +1485,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);
OvS only supports RSTP_MAX_PORTS rstp ports while max port num of stp is STP_MAX_PORTS. This patch increments the rstp port num counter, otherwise the counter is 0 and the checking above will always fail. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> --- vswitchd/bridge.c | 4 ++++ 1 file changed, 4 insertions(+)