[ONOS-4172] Issue fixed to process specific packets in SFC manager
Change-Id: Ib5cb6006b42a6b163b85fe89f725002336442baf
diff --git a/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java b/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java
index 2acb878..0d7702c 100644
--- a/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java
+++ b/apps/vtn/sfcmgr/src/main/java/org/onosproject/sfc/manager/impl/SfcManager.java
@@ -539,7 +539,7 @@
@Override
public void process(PacketContext context) {
Ethernet packet = context.inPacket().parsed();
- if (packet == null) {
+ if (packet == null || portChainService.getPortChainCount() == 0) {
return;
}
// get the five tuple parameters for the packet
@@ -565,12 +565,16 @@
UDP udpPacket = (UDP) ipv4Packet.getPayload();
portSrc = udpPacket.getSourcePort();
portDst = udpPacket.getDestinationPort();
+ } else if (protocol == IPv4.PROTOCOL_ICMP) {
+ // do nothing
+ } else {
+ // No need to process other packets received by controller.
+ return;
}
} else if (ethType == Ethernet.TYPE_IPV6) {
return;
}
-
FiveTuple fiveTuple = DefaultFiveTuple.builder()
.setIpSrc(ipSrc)
.setIpDst(ipDst)