In port is set to zero after FIP translations. 42/78642/2
authorAswin Suryanarayanan <[email protected]>
Fri, 7 Dec 2018 09:19:00 +0000 (14:49 +0530)
committerAswin Suryanarayanan <[email protected]>
Wed, 19 Dec 2018 14:17:49 +0000 (14:17 +0000)
In table 27 and table 28 in port is explicitly set to zero so that
packet will not be dropped when it has to be send back to the tunnel it
came from.

NETVIRT-1534 FIP to FIP traffic fails when the translation happens on a
remote switch

Change-Id: I10651762db43be4adc4c1584c51a954176fc63d3
Signed-off-by: Aswin Suryanarayanan <[email protected]>
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/FloatingIPListener.java

index f9e0ec2a40c2a77fc0962616b23e4d9d57d65cb8..bdfdf1e14026812a8271a1470a23dca10adf3a57 100644 (file)
@@ -35,6 +35,7 @@ import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.MatchInfo;
 import org.opendaylight.genius.mdsalutil.MetaDataUtil;
 import org.opendaylight.genius.mdsalutil.NwConstants;
+import org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort;
 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit;
 import org.opendaylight.genius.mdsalutil.actions.ActionSetDestinationIp;
 import org.opendaylight.genius.mdsalutil.actions.ActionSetFieldEthernetSource;
@@ -202,6 +203,7 @@ public class FloatingIPListener extends AsyncDataTreeChangeListenerBase<Internal
         List<InstructionInfo> instructions = new ArrayList<>();
 //        instructions.add(new InstructionWriteMetadata(BigInteger.valueOf
 //                (routerId), MetaDataUtil.METADATA_MASK_VRFID));
+        actionsInfos.add(new ActionNxLoadInPort(BigInteger.ZERO));
         actionsInfos.add(new ActionNxResubmit(NwConstants.L3_FIB_TABLE));
         instructions.add(new InstructionApplyActions(actionsInfos));
         //instructions.add(new InstructionGotoTable(NatConstants.L3_FIB_TABLE));
@@ -268,6 +270,7 @@ public class FloatingIPListener extends AsyncDataTreeChangeListenerBase<Internal
         matches.add(new MatchIpv4Source(externalIp, "32"));
 
         List<ActionInfo> actionsInfo = new ArrayList<>();
+        actionsInfo.add(new ActionNxLoadInPort(BigInteger.ZERO));
         Uuid floatingIpId = mapping.getExternalId();
         String macAddress = NatUtil.getFloatingIpPortMacFromFloatingIpId(dataBroker, floatingIpId);
         if (macAddress != null) {