Pavlin Radoslavov

Use the correct IPv6 source address when forwarding NDP requests

on external ports.

This fixes ONOS-1021

Also, a minor optimization when forwarding the ARP or NDP request
on external ports.

Change-Id: Ic745e1af1f0a0602751977726a850f48afe84262
......@@ -176,6 +176,7 @@ public class ProxyArpManager implements ProxyArpService {
pa.vlan().equals(vlan)) {
matched = true;
sendTo(eth, pa.connectPoint());
break;
}
}
}
......@@ -246,7 +247,7 @@ public class ProxyArpManager implements ProxyArpService {
// it could be a request from an internal host to an external
// address. Forward it over to the correct ports.
Ip6Address source =
Ip6Address.valueOf(nsol.getTargetAddress());
Ip6Address.valueOf(ipv6.getSourceAddress());
Set<PortAddresses> sourceAddresses = findPortsInSubnet(source);
boolean matched = false;
for (PortAddresses pa : sourceAddresses) {
......@@ -255,6 +256,7 @@ public class ProxyArpManager implements ProxyArpService {
pa.vlan().equals(vlan)) {
matched = true;
sendTo(eth, pa.connectPoint());
break;
}
}
}
......