Segment Routing ONS demo fixes: Includes traffic visualization fix
Change-Id: I5119271464b696fd145c6b63bee09d7f3ef109bd
diff --git a/src/main/java/org/onosproject/segmentrouting/IpHandler.java b/src/main/java/org/onosproject/segmentrouting/IpHandler.java
index a46fb57..81d00f5 100644
--- a/src/main/java/org/onosproject/segmentrouting/IpHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/IpHandler.java
@@ -121,6 +121,10 @@
* @param destIpAddress destination IP address
*/
public void forwardPackets(DeviceId deviceId, Ip4Address destIpAddress) {
+ if (ipPacketQueue.get(destIpAddress) == null) {
+ return;
+ }
+
for (IPv4 ipPacket : ipPacketQueue.get(destIpAddress)) {
Ip4Address destAddress = Ip4Address.valueOf(ipPacket.getDestinationAddress());
if (ipPacket != null && config.inSameSubnet(deviceId, destAddress)) {