commit | 6a83c4a3b470c9f9e27a14be9d9476000c66ba4d | [log] [tgz] |
---|---|---|
author | Pier Luigi <pierventre@hotmail.com> | Sun Jan 29 12:38:48 2017 -0800 |
committer | Ray Milkey <ray@onlab.us> | Fri Feb 03 00:54:56 2017 +0000 |
tree | 69711a307055003ad3874916968383b4131aa338 | |
parent | 29cafae3b83dad7bcb19d9d13e97de7b0425e1d9 [diff] [blame] |
Fix npe when one of the address is not configured Change-Id: If42b4d35bc20060db0bc0fe2699e3b375c2cf9f8
diff --git a/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java b/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java index 1594364..9675620 100644 --- a/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java +++ b/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
@@ -431,7 +431,10 @@ /* * Retrieves device info. */ - getSenderInfo(senderMacAddress, senderIpAddress, deviceId, targetAddress); + if (!getSenderInfo(senderMacAddress, senderIpAddress, deviceId, targetAddress)) { + log.warn("Aborting sendNdpRequest, we cannot get all the information needed"); + return; + } /* * We have to compute the dst mac address and dst * ip address.