[ovs-dev] [PATCH] stp: port_no counter is off by one

Ansis Atteka aatteka at nicira.com
Wed Aug 22 00:14:35 UTC 2012


Thanks pushed to branch-1.8 and master.

On Tue, Aug 21, 2012 at 5:06 PM, Ethan Jackson <ethan at nicira.com> wrote:
> Acked-by: Ethan Jackson <ethan at nicira.com>
>
>
> On Tue, Aug 21, 2012 at 5:01 PM, Ansis Atteka <aatteka at nicira.com> wrote:
>> 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 at nicira.com>
>> Reported-by: Ram Jothikumar
>> ---
>>  vswitchd/bridge.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
>> index bd8e772..1fbbe32 100644
>> --- a/vswitchd/bridge.c
>> +++ b/vswitchd/bridge.c
>> @@ -937,7 +937,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;
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> dev mailing list
>> dev at openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list