summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsis Atteka <aatteka@nicira.com>2012-08-21 16:48:36 -0700
committerAnsis Atteka <aatteka@nicira.com>2012-08-22 13:09:50 -0700
commit327620d63e85999993c5240e36b5c8d742c3ba38 (patch)
treecf317189fe96e1f7c49cd18654ab315503881ae8
parent4133cc197f7a498ed9d4644d48cdf97dfb71d54f (diff)
downloadopenvswitch-327620d63e85999993c5240e36b5c8d742c3ba38.tar.gz
stp: port_no counter is off by one
This counter was off by one, because port_num should be less than STP_MAX_PORTS. This caused an assert hit later in stp_get_port(). Issue: 13059 Signed-off-by: Ansis Atteka <aatteka@nicira.com> Reported-by: Ram Jothikumar <rjothikumar@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
-rw-r--r--vswitchd/bridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 0c78f946c..92d54a66f 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -933,7 +933,7 @@ port_configure_stp(const struct ofproto *ofproto, struct port *port,
bitmap_set1(port_num_bitmap, port_idx);
port_s->port_num = port_idx;
} else {
- if (*port_num_counter > STP_MAX_PORTS) {
+ if (*port_num_counter >= STP_MAX_PORTS) {
VLOG_ERR("port %s: too many STP ports, disabling", port->name);
port_s->enable = false;
return;