Fix IPv6-related bug in SDN-IP.
- Use the correct API to set an IPv6 prefix in the matching condition
Change-Id: I7911a7e886024bff5442821816e4481570ec8172
diff --git a/apps/sdnip/src/main/java/org/onosproject/sdnip/IntentSynchronizer.java b/apps/sdnip/src/main/java/org/onosproject/sdnip/IntentSynchronizer.java
index 7677b07..c10df94 100644
--- a/apps/sdnip/src/main/java/org/onosproject/sdnip/IntentSynchronizer.java
+++ b/apps/sdnip/src/main/java/org/onosproject/sdnip/IntentSynchronizer.java
@@ -317,10 +317,11 @@
TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
if (prefix.version() == Ip4Address.VERSION) {
selector.matchEthType(Ethernet.TYPE_IPV4);
+ selector.matchIPDst(prefix);
} else {
selector.matchEthType(Ethernet.TYPE_IPV6);
+ selector.matchIPv6Dst(prefix);
}
- selector.matchIPDst(prefix);
// Rewrite the destination MAC address
TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder()