Pavlin Radoslavov

Fix IPv6-related bug in SDN-IP.

 - Use the correct API to set an IPv6 prefix in the matching condition

Change-Id: I7911a7e886024bff5442821816e4481570ec8172
...@@ -317,10 +317,11 @@ public class IntentSynchronizer implements FibListener { ...@@ -317,10 +317,11 @@ public class IntentSynchronizer implements FibListener {
317 TrafficSelector.Builder selector = DefaultTrafficSelector.builder(); 317 TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
318 if (prefix.version() == Ip4Address.VERSION) { 318 if (prefix.version() == Ip4Address.VERSION) {
319 selector.matchEthType(Ethernet.TYPE_IPV4); 319 selector.matchEthType(Ethernet.TYPE_IPV4);
320 + selector.matchIPDst(prefix);
320 } else { 321 } else {
321 selector.matchEthType(Ethernet.TYPE_IPV6); 322 selector.matchEthType(Ethernet.TYPE_IPV6);
323 + selector.matchIPv6Dst(prefix);
322 } 324 }
323 - selector.matchIPDst(prefix);
324 325
325 // Rewrite the destination MAC address 326 // Rewrite the destination MAC address
326 TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder() 327 TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder()
......
...@@ -574,10 +574,11 @@ public class IntentSyncTest extends AbstractIntentTest { ...@@ -574,10 +574,11 @@ public class IntentSyncTest extends AbstractIntentTest {
574 DefaultTrafficSelector.builder(); 574 DefaultTrafficSelector.builder();
575 if (ipPrefix.version() == Ip4Address.VERSION) { 575 if (ipPrefix.version() == Ip4Address.VERSION) {
576 selectorBuilder.matchEthType(Ethernet.TYPE_IPV4); // IPv4 576 selectorBuilder.matchEthType(Ethernet.TYPE_IPV4); // IPv4
577 + selectorBuilder.matchIPDst(ipPrefix);
577 } else { 578 } else {
578 selectorBuilder.matchEthType(Ethernet.TYPE_IPV6); // IPv6 579 selectorBuilder.matchEthType(Ethernet.TYPE_IPV6); // IPv6
580 + selectorBuilder.matchIPv6Dst(ipPrefix);
579 } 581 }
580 - selectorBuilder.matchIPDst(ipPrefix);
581 582
582 TrafficTreatment.Builder treatmentBuilder = 583 TrafficTreatment.Builder treatmentBuilder =
583 DefaultTrafficTreatment.builder(); 584 DefaultTrafficTreatment.builder();
......