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
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -176,6 +176,7 @@ public class ProxyArpManager implements ProxyArpService { | ... | @@ -176,6 +176,7 @@ public class ProxyArpManager implements ProxyArpService { |
176 | pa.vlan().equals(vlan)) { | 176 | pa.vlan().equals(vlan)) { |
177 | matched = true; | 177 | matched = true; |
178 | sendTo(eth, pa.connectPoint()); | 178 | sendTo(eth, pa.connectPoint()); |
179 | + break; | ||
179 | } | 180 | } |
180 | } | 181 | } |
181 | } | 182 | } |
... | @@ -246,7 +247,7 @@ public class ProxyArpManager implements ProxyArpService { | ... | @@ -246,7 +247,7 @@ public class ProxyArpManager implements ProxyArpService { |
246 | // it could be a request from an internal host to an external | 247 | // it could be a request from an internal host to an external |
247 | // address. Forward it over to the correct ports. | 248 | // address. Forward it over to the correct ports. |
248 | Ip6Address source = | 249 | Ip6Address source = |
249 | - Ip6Address.valueOf(nsol.getTargetAddress()); | 250 | + Ip6Address.valueOf(ipv6.getSourceAddress()); |
250 | Set<PortAddresses> sourceAddresses = findPortsInSubnet(source); | 251 | Set<PortAddresses> sourceAddresses = findPortsInSubnet(source); |
251 | boolean matched = false; | 252 | boolean matched = false; |
252 | for (PortAddresses pa : sourceAddresses) { | 253 | for (PortAddresses pa : sourceAddresses) { |
... | @@ -255,6 +256,7 @@ public class ProxyArpManager implements ProxyArpService { | ... | @@ -255,6 +256,7 @@ public class ProxyArpManager implements ProxyArpService { |
255 | pa.vlan().equals(vlan)) { | 256 | pa.vlan().equals(vlan)) { |
256 | matched = true; | 257 | matched = true; |
257 | sendTo(eth, pa.connectPoint()); | 258 | sendTo(eth, pa.connectPoint()); |
259 | + break; | ||
258 | } | 260 | } |
259 | } | 261 | } |
260 | } | 262 | } | ... | ... |
-
Please register or login to post a comment