Fixed problem with incorrect subnet validation with container flow
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / match / Match.java
index 736314caedc2cb535a9e8160e3d056789e2d67c5..71e0087090334f12c18561e94f7c0fc5f5443126 100644 (file)
@@ -293,10 +293,8 @@ public class Match implements Cloneable, Serializable {
                         && filterAddress instanceof Inet4Address) {
                     return true;
                 }
-                InetAddress thisMask = (InetAddress) filter.getField(type)
-                        .getMask();
-                InetAddress filterMask = (InetAddress) filter.getField(type)
-                        .getMask();
+                InetAddress thisMask = (InetAddress) thisField.getMask();
+                InetAddress filterMask = (InetAddress) filterField.getMask();
                 // thisAddress has to be in same subnet of filterAddress
                 if (NetUtils.inetAddressConflict(thisAddress, filterAddress,
                         thisMask, filterMask)) {