Process RARP packets with ethertype 0x8035 similar to ARP packets.
[openvswitch] / lib / meta-flow.c
index 591eb34447672c6e8671254f272d3e0553fc147b..0b97049a4bd23c5fb49a44b8c2e30321cc2b0af2 100644 (file)
@@ -834,7 +834,8 @@ mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow)
         return true;
 
     case MFP_ARP:
-        return flow->dl_type == htons(ETH_TYPE_ARP);
+      return (flow->dl_type == htons(ETH_TYPE_ARP) ||
+              flow->dl_type == htons(ETH_TYPE_RARP));
     case MFP_IPV4:
         return flow->dl_type == htons(ETH_TYPE_IP);
     case MFP_IPV6:
@@ -1941,8 +1942,7 @@ mf_from_ofp_port_string(const struct mf_field *mf, const char *s,
     uint16_t port;
 
     assert(mf->n_bytes == sizeof(ovs_be16));
-    port = ofputil_port_from_string(s);
-    if (port) {
+    if (ofputil_port_from_string(s, &port)) {
         *valuep = htons(port);
         *maskp = htons(UINT16_MAX);
         return NULL;