Charles M.C. Chan
Committed by Gerrit Code Review

Bugfix for gerrit #3377

NDP packets, especially NS/NA packets, are not resolved correctly in my previous commit #3377.
As a result, the IPv6 addresses of normal hosts are not recorded by HostLocationProvider.

Change-Id: Id44485902d9b593c2a8aa376e405f548774203d2
......@@ -321,15 +321,16 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid
}
// Neighbor Discovery Protocol
if (pkt instanceof ICMP6) {
pkt = pkt.getPayload();
if (pkt != null && pkt instanceof ICMP6) {
pkt = pkt.getPayload();
// RouterSolicitation, RouterAdvertisement
if (pkt instanceof RouterAdvertisement ||
pkt instanceof RouterSolicitation) {
if (pkt != null && (pkt instanceof RouterAdvertisement ||
pkt instanceof RouterSolicitation)) {
return;
}
if (pkt instanceof NeighborSolicitation ||
pkt instanceof NeighborAdvertisement) {
if (pkt != null && (pkt instanceof NeighborSolicitation ||
pkt instanceof NeighborAdvertisement)) {
// Duplicate Address Detection
if (ip.isZero()) {
return;
......