List<InstructionInfo> instructions = new ArrayList<>();
instructions.add(new InstructionGotoTable(NwConstants.PSNAT_TABLE));
- String flowRef = NatUtil.getFlowRef(dpId, NwConstants.L3_FIB_TABLE, defaultIP);
+ String flowRef = NatUtil.getFlowRef(dpId, NwConstants.L3_FIB_TABLE, defaultIP, vpnId);
FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.L3_FIB_TABLE, flowRef,
NatConstants.DEFAULT_DNAT_FLOW_PRIORITY, flowRef, 0, 0,
+ "Cannot proceed with installation of Default NAT flow");
return;
}
+ LOG.debug("NAT Service : Installing flow {}", flowEntity);
mdsalManager.installFlow(flowEntity);
}
+ "Cannot proceed with installation of Default NAT flow");
return;
}
+ LOG.debug("NAT Service : Removing flow {}", flowEntity);
mdsalManager.removeFlow(flowEntity);
}
}
.FLOWID_SEPARATOR + routerID + NatConstants.FLOWID_SEPARATOR + ip;
}
- public static String getFlowRef(BigInteger dpnId, short tableId, InetAddress destPrefix) {
- return NatConstants.FLOWID_PREFIX + dpnId + NwConstants.FLOWID_SEPARATOR + tableId + NwConstants
- .FLOWID_SEPARATOR + destPrefix.getHostAddress();
- }
-
public static String getFlowRef(BigInteger dpnId, short tableId, InetAddress destPrefix, long vpnId) {
return NatConstants.NAPT_FLOWID_PREFIX + dpnId + NatConstants.FLOWID_SEPARATOR + tableId + NatConstants
- .FLOWID_SEPARATOR + vpnId;
+ .FLOWID_SEPARATOR + destPrefix.getHostAddress() + NatConstants.FLOWID_SEPARATOR + vpnId;
}
public static String getNaptFlowRef(BigInteger dpnId, short tableId, String routerID, String ip, int port) {