[ovs-git] [openvswitch/ovs] a9fedc: ofp-actions: Store raw type for NXAST_LEARN2.

GitHub noreply at github.com
Wed Jun 21 23:13:56 UTC 2017

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: a9fedc789078024cce8af6af267521f58760f31f
  Author: Joe Stringer <joe at ovn.org>
  Date:   2017-06-21 (Wed, 21 Jun 2017)

  Changed paths:
    M lib/ofp-actions.c
    M tests/ofp-actions.at

  Log Message:
  ofp-actions: Store raw type for NXAST_LEARN2.

Previously, if a controller wrote a flow with action NXAST_LEARN2, then
OVS would internally store an ofpact_learn structure with the raw type
set to NXAST_LEARN. When re-encoding, if the learn action happened to
have a limit or dst_ofs specified (which can only be specified for
NXAST_LEARN2), then it would re-encode using NXAST_LEARN2. However, if
these fields were both zero then OVS relies on the ofpact 'raw' type to
re-encode the action, so would end up encoding it as NXAST_LEARN in
subsequent serialization.

Fix this issue by storing the raw type when decoding learn actions.

VMWare-BZ: #1897275
Fixes: 4c71600d2256 ("ofp-actions: Add limit to learn action.")
Reported-by: Harold Lim <haroldl at vmware.com>
Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>

More information about the git mailing list