diff options
author | Ansis Atteka <aatteka@nicira.com> | 2012-08-21 16:48:36 -0700 |
---|---|---|
committer | Ansis Atteka <aatteka@nicira.com> | 2012-08-22 13:10:15 -0700 |
commit | 196ba341736b273c1ddf15e2545beec623d95bbd (patch) | |
tree | 631820192582a6ab6ffc63ae12e65f2ac2ce8841 | |
parent | 865f22b3b3cb953c48ed30dd21f16ea3dd53f04c (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 5e2ad697..29f9c45e 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -826,7 +826,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; |