[ONOS-4172] Issue fixed to process specific packets in SFC manager
Change-Id: Ibb2f6a4825b6658031cf3c30e3c9b1497f16e4ef
Showing
1 changed file
with
6 additions
and
1 deletions
| ... | @@ -539,7 +539,7 @@ public class SfcManager implements SfcService { | ... | @@ -539,7 +539,7 @@ public class SfcManager implements SfcService { |
| 539 | @Override | 539 | @Override |
| 540 | public void process(PacketContext context) { | 540 | public void process(PacketContext context) { |
| 541 | Ethernet packet = context.inPacket().parsed(); | 541 | Ethernet packet = context.inPacket().parsed(); |
| 542 | - if (packet == null) { | 542 | + if (packet == null || portChainService.getPortChainCount() == 0) { |
| 543 | return; | 543 | return; |
| 544 | } | 544 | } |
| 545 | // get the five tuple parameters for the packet | 545 | // get the five tuple parameters for the packet |
| ... | @@ -565,6 +565,11 @@ public class SfcManager implements SfcService { | ... | @@ -565,6 +565,11 @@ public class SfcManager implements SfcService { |
| 565 | UDP udpPacket = (UDP) ipv4Packet.getPayload(); | 565 | UDP udpPacket = (UDP) ipv4Packet.getPayload(); |
| 566 | portSrc = udpPacket.getSourcePort(); | 566 | portSrc = udpPacket.getSourcePort(); |
| 567 | portDst = udpPacket.getDestinationPort(); | 567 | portDst = udpPacket.getDestinationPort(); |
| 568 | + } else if (protocol == IPv4.PROTOCOL_ICMP) { | ||
| 569 | + // do nothing | ||
| 570 | + } else { | ||
| 571 | + // No need to process other packets received by controller. | ||
| 572 | + return; | ||
| 568 | } | 573 | } |
| 569 | } else if (ethType == Ethernet.TYPE_IPV6) { | 574 | } else if (ethType == Ethernet.TYPE_IPV6) { |
| 570 | return; | 575 | return; | ... | ... |
-
Please register or login to post a comment