T3 avoiding false flow rule match
Change-Id: I02da847efcab05b6df270f691898771846e05d49
(cherry picked from commit 804e4f89e371d77df058bff03515be81c7222ea8)
diff --git a/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java b/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java
index b66996d..1481c30 100644
--- a/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java
+++ b/apps/t3/src/main/java/org/onosproject/t3/impl/TroubleshootManager.java
@@ -668,14 +668,14 @@
//TODO handle MAC matching
return flowEntry.selector().criteria().stream().allMatch(criterion -> {
Criterion.Type type = criterion.type();
- //If the critrion has IP we need to do LPM to establish matching.
+ //If the criterion has IP we need to do LPM to establish matching.
if (type.equals(Criterion.Type.IPV4_SRC) || type.equals(Criterion.Type.IPV4_DST) ||
type.equals(Criterion.Type.IPV6_SRC) || type.equals(Criterion.Type.IPV6_DST)) {
IPCriterion ipCriterion = (IPCriterion) criterion;
IPCriterion matchCriterion = (IPCriterion) packet.getCriterion(ipCriterion.type());
- //if the packet does not have an IPv4 or IPv6 criterion we return true
+ //if the packet does not have an IPv4 or IPv6 criterion we return false
if (matchCriterion == null) {
- return true;
+ return false;
}
try {
Subnet subnet = Subnet.createInstance(ipCriterion.ip().toString());