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:10:06 -0700
commit0b00e03e74d42a9fd523b1f6f1687fc91c624600 (patch)
treebe4a355243410e739529dbad581e98894fa8873a
parent9f3385cd758e655d778f6d2286f9d472a7278b8d (diff)
downloadopenvswitch-0b00e03e74d42a9fd523b1f6f1687fc91c624600.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 bb7a326f9..cae22e870 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -935,7 +935,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;