BUG-5013 Fix check logic in MatchUtils.createICMPv4Match
[ovsdb.git] / utils / mdsal-openflow / src / main / java / org / opendaylight / ovsdb / utils / mdsal / openflow / MatchUtils.java
index bbb93d8b5532b7363db72a76051b9572f5200604..7078486a92553a1d5a018a1fdc33c61cfc00c3c9 100644 (file)
@@ -236,8 +236,10 @@ public class MatchUtils {
 
         // Build the ICMPv4 Match
         Icmpv4MatchBuilder icmpv4match = new Icmpv4MatchBuilder();
-        if (type != ALL_ICMP || code != ALL_ICMP) {
+        if (type != ALL_ICMP) {
             icmpv4match.setIcmpv4Type(type);
+        }
+        if (code != ALL_ICMP) {
             icmpv4match.setIcmpv4Code(code);
         }
         matchBuilder.setIcmpv4Match(icmpv4match.build());