-
Joe Stringer authored
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: 4c71600d ("ofp-actions: Add limit to learn action.") Reported-by: Harold Lim <haroldl@vmware.com> Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
a9fedc78