Skip to content
  • Joe Stringer's avatar
    ofp-actions: Store raw type for NXAST_LEARN2. · a9fedc78
    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: default avatarHarold Lim <haroldl@vmware.com>
    Signed-off-by: default avatarJoe Stringer <joe@ovn.org>
    Acked-by: default avatarYi-Hung Wei <yihung.wei@gmail.com>
    a9fedc78