[ovs-git] [openvswitch/ovs] 6db454: ofproto-dpif-rid: correct logic error in rid_pool_...

GitHub noreply at github.com
Wed Sep 24 21:05:23 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 6db454dc00fa5d9693ebdf6c5e10c61030f8df8e
      https://github.com/openvswitch/ovs/commit/6db454dc00fa5d9693ebdf6c5e10c61030f8df8e
  Author: Simon Horman <simon.horman at netronome.com>
  Date:   2014-09-24 (Wed, 24 Sep 2014)

  Changed paths:
    M ofproto/ofproto-dpif-rid.c

  Log Message:
  -----------
  ofproto-dpif-rid: correct logic error in rid_pool_alloc_id()

When searching through the valid ids an id should
be used if is not found rather than if it is found.

It appears to me that without this change duplicate recirculation
ids may used in cases where the last recirculation id has
been allocated; selection loops back to the beginning of the pool and;
reaches a recirculation id that is still in use.

As the number of recirculation ids is currently RECIRC_ID_N_IDS = 1024 this
does not seem beyond the bounds of possibility.

I have not verified that such a scenario can actually occur.  But it seems
that a likely consequence would be that some packets may be forwarded
incorrectly.

Signed-off-by: Simon Horman <simon.horman at netronome.com>
Signed-off-by: Andy Zhou <azhou at nicira.com>




More information about the git mailing list