Conntrack headers fails to parse. 88/74388/3
authorAswin Suryanarayanan <asuryana@redhat.com>
Tue, 24 Jul 2018 11:17:11 +0000 (16:47 +0530)
committerSam Hague <shague@redhat.com>
Thu, 26 Jul 2018 11:35:01 +0000 (11:35 +0000)
The extra headers added to the packet when it return from ovs after a
conntrack operation causes deserialization error when the packet is
punted to the controller.

Added ct_clear action once the packet is returned from conntrack in
table=47

table=47, n_packets=50, n_bytes=4887,
priority=6,ct_state=+snat,ip,metadata=0x30d40/0xfffffe
actions=load:0x30d48->OXM_OF_METADATA[0..23],
load:0->NXM_OF_IN_PORT[],ct_clear,resubmit(,21)

NETVIRT-1383 Traffic to the PNF from a VM without FIP fails(SNAT
conntrack)

Change-Id: Ib34109b7fe3c7aa1df105c8504394291031e68d6
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/ConntrackBasedSnatService.java

index c334240dbc27e8dc700b62d45a3a1637b1b66365..85b5361eb90c02a9c23fca6d398a08f9de554f32 100644 (file)
@@ -27,6 +27,7 @@ import org.opendaylight.genius.mdsalutil.NWUtil;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack;
 import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack.NxCtAction;
+import org.opendaylight.genius.mdsalutil.actions.ActionNxCtClear;
 import org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort;
 import org.opendaylight.genius.mdsalutil.actions.ActionNxLoadMetadata;
 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit;
@@ -316,9 +317,10 @@ public abstract class ConntrackBasedSnatService extends AbstractSnatService {
         ActionNxLoadMetadata actionLoadMeta = new ActionNxLoadMetadata(MetaDataUtil
             .getVpnIdMetadata(extSubnetId), LOAD_START, LOAD_END);
         listActionInfo.add(actionLoadMeta);
-        ArrayList<InstructionInfo> instructions = new ArrayList<>();
         listActionInfo.add(new ActionNxLoadInPort(BigInteger.ZERO));
+        listActionInfo.add(new ActionNxCtClear());
         listActionInfo.add(new ActionNxResubmit(NwConstants.L3_FIB_TABLE));
+        ArrayList<InstructionInfo> instructions = new ArrayList<>();
         instructions.add(new InstructionApplyActions(listActionInfo));
         String flowRef = getFlowRef(dpnId, NwConstants.NAPT_PFIB_TABLE, routerId);
         flowRef = flowRef + "OUTBOUND";