Phaneendra Manda
Committed by Gerrit Code Review

[ONOS-4172] Issue fixed to process specific packets in SFC manager

Change-Id: Ib5cb6006b42a6b163b85fe89f725002336442baf
......@@ -539,7 +539,7 @@ public class SfcManager implements SfcService {
@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 @@ public class SfcManager implements SfcService {
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)
......