In port is set to zero after FIP translations. 35/78535/4
authorAswin Suryanarayanan <asuryana@redhat.com>
Fri, 7 Dec 2018 09:19:00 +0000 (14:49 +0530)
committerSridhar Gaddam <sgaddam@redhat.com>
Tue, 18 Dec 2018 19:04:28 +0000 (19:04 +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 <asuryana@redhat.com>
natservice/impl/src/main/java/org/opendaylight/netvirt/natservice/internal/FloatingIPListener.java

index 7ff3f2fc7d82f9b273b413efad67b835d9f062af..75ad2ad00a4f49b8333c6565ceeef5212afd3797 100644 (file)
@@ -36,6 +36,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;
@@ -204,6 +205,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));
@@ -271,6 +273,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) {