openflow: Delete icmp_type and icmp_code macros.
[sliver-openvswitch.git] / lib / meta-flow.c
index 7154426..f2f1348 100644 (file)
@@ -591,17 +591,17 @@ mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow)
 
     case MFP_ND:
         return (is_icmpv6(flow)
-                && flow->icmp_code == htons(0)
-                && (flow->icmp_type == htons(ND_NEIGHBOR_SOLICIT) ||
-                    flow->icmp_type == htons(ND_NEIGHBOR_ADVERT)));
+                && flow->tp_dst == htons(0)
+                && (flow->tp_src == htons(ND_NEIGHBOR_SOLICIT) ||
+                    flow->tp_src == htons(ND_NEIGHBOR_ADVERT)));
     case MFP_ND_SOLICIT:
         return (is_icmpv6(flow)
-                && flow->icmp_code == htons(0)
-                && (flow->icmp_type == htons(ND_NEIGHBOR_SOLICIT)));
+                && flow->tp_dst == htons(0)
+                && (flow->tp_src == htons(ND_NEIGHBOR_SOLICIT)));
     case MFP_ND_ADVERT:
         return (is_icmpv6(flow)
-                && flow->icmp_code == htons(0)
-                && (flow->icmp_type == htons(ND_NEIGHBOR_ADVERT)));
+                && flow->tp_dst == htons(0)
+                && (flow->tp_src == htons(ND_NEIGHBOR_ADVERT)));
     }
 
     NOT_REACHED();