Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
index 8bd0960..ebd672c 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
@@ -161,7 +161,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(port);
+            return Objects.hash(port, type());
         }
 
         @Override
@@ -171,7 +171,8 @@
             }
             if (obj instanceof PortCriterion) {
                 PortCriterion that = (PortCriterion) obj;
-                return Objects.equals(port, that.port);
+                return Objects.equals(port, that.port) &&
+                        Objects.equals(this.type(), that.type());
 
             }
             return false;
@@ -252,7 +253,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(ethType);
+            return Objects.hash(ethType, type());
         }
 
         @Override
@@ -262,7 +263,8 @@
             }
             if (obj instanceof EthTypeCriterion) {
                 EthTypeCriterion that = (EthTypeCriterion) obj;
-                return Objects.equals(ethType, that.ethType);
+                return Objects.equals(ethType, that.ethType) &&
+                        Objects.equals(this.type(), that.type());
 
 
             }
@@ -345,7 +347,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(proto);
+            return Objects.hash(proto, type());
         }
 
         @Override
@@ -400,7 +402,8 @@
             }
             if (obj instanceof VlanPcpCriterion) {
                 VlanPcpCriterion that = (VlanPcpCriterion) obj;
-                return Objects.equals(vlanPcp, that.vlanPcp);
+                return Objects.equals(vlanPcp, that.vlanPcp) &&
+                        Objects.equals(this.type(), that.type());
 
 
             }
@@ -436,7 +439,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(vlanId);
+            return Objects.hash(vlanId, type());
         }
 
         @Override
@@ -446,7 +449,8 @@
             }
             if (obj instanceof VlanIdCriterion) {
                 VlanIdCriterion that = (VlanIdCriterion) obj;
-                return Objects.equals(vlanId, that.vlanId);
+                return Objects.equals(vlanId, that.vlanId) &&
+                        Objects.equals(this.type(), that.type());
 
 
             }
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java
index ce7e16b..2152532 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L2ModificationInstruction.java
@@ -78,7 +78,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(mac, subtype);
+            return Objects.hash(mac, type(), subtype);
         }
 
         @Override
@@ -89,6 +89,7 @@
             if (obj instanceof ModEtherInstruction) {
                 ModEtherInstruction that = (ModEtherInstruction) obj;
                 return  Objects.equals(mac, that.mac) &&
+                        Objects.equals(this.type(), that.type()) &&
                         Objects.equals(subtype, that.subtype);
 
             }
@@ -126,7 +127,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(vlanId, subtype());
+            return Objects.hash(vlanId, type(), subtype());
         }
 
         @Override
@@ -136,7 +137,9 @@
             }
             if (obj instanceof ModVlanIdInstruction) {
                 ModVlanIdInstruction that = (ModVlanIdInstruction) obj;
-                return  Objects.equals(vlanId, that.vlanId);
+                return  Objects.equals(vlanId, that.vlanId) &&
+                        Objects.equals(this.type(), that.type()) &&
+                        Objects.equals(this.subtype(), that.subtype());
 
             }
             return false;
@@ -173,7 +176,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(vlanPcp, subtype());
+            return Objects.hash(vlanPcp, type(), subtype());
         }
 
         @Override
@@ -183,7 +186,9 @@
             }
             if (obj instanceof ModVlanPcpInstruction) {
                 ModVlanPcpInstruction that = (ModVlanPcpInstruction) obj;
-                return  Objects.equals(vlanPcp, that.vlanPcp);
+                return  Objects.equals(vlanPcp, that.vlanPcp) &&
+                        Objects.equals(this.type(), that.type()) &&
+                        Objects.equals(this.subtype(), that.subtype());
 
             }
             return false;
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java
index cf81f86..7ec8c84 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/instructions/L3ModificationInstruction.java
@@ -70,7 +70,7 @@
 
         @Override
         public int hashCode() {
-            return Objects.hash(ip, subtype());
+            return Objects.hash(ip, type(), subtype());
         }
 
         @Override
@@ -80,7 +80,9 @@
             }
             if (obj instanceof ModIPInstruction) {
                 ModIPInstruction that = (ModIPInstruction) obj;
-                return  Objects.equals(ip, that.ip);
+                return  Objects.equals(ip, that.ip) &&
+                        Objects.equals(this.type(), that.type()) &&
+                        Objects.equals(this.subtype(), that.subtype());
 
             }
             return false;