[ovs-git] [openvswitch/ovs] 6aaa50: tun-metadata: Use correct offset when accessing fr...

GitHub noreply at github.com
Tue Jun 21 17:19:36 UTC 2016


  Branch: refs/heads/branch-2.5
  Home:   https://github.com/openvswitch/ovs
  Commit: 6aaa50d8fae2e83045f3eecfbc09206714b10d25
      https://github.com/openvswitch/ovs/commit/6aaa50d8fae2e83045f3eecfbc09206714b10d25
  Author: Jesse Gross <jesse at kernel.org>
  Date:   2016-06-21 (Tue, 21 Jun 2016)

  Changed paths:
    M lib/tun-metadata.c

  Log Message:
  -----------
  tun-metadata: Use correct offset when accessing fragmented metadata.

Since tunnel metadata is stored in a fixed area in the flow match
field, we must allocate space for options as they are registered with
the switch. In order to avoid exposing implementation complexity to
the controller, we support fragmentation when we run out of contiguous
blocks that are large enough to handle new requests.

When reading or writing to these fragmented blocks, there is a bug
that would cause us to keep on using the area after the allocated
space rather than moving to the next offset. This corrects that to
use the offset for each block.

Unfortunately, while we did have a test for this exact use case, since
the same bug was present in both reading and writing code, everything
appeared to work as normal from the outside.

Signed-off-by: Jesse Gross <jesse at kernel.org>
Acked-by: Jarno Rajahalme <jarno at ovn.org>




More information about the git mailing list