#include "dynamic-string.h"
#include "ofp-util.h"
#include "packets.h"
-#include "vlog.h"
-
-VLOG_DEFINE_THIS_MODULE(match);
-
/* Converts the flow in 'flow' into a match in 'match', with the given
* 'wildcards'. */
if (flow->nw_frag) {
memset(&wc->masks.nw_frag, 0xff, sizeof wc->masks.nw_frag);
+ if (flow->nw_frag & FLOW_NW_FRAG_LATER) {
+ /* No transport layer header in later fragments. */
+ return;
+ }
}
if (flow->nw_proto == IPPROTO_ICMP ||
return;
}
-/* Converts the flow in 'flow' into an exact-match match in 'match'. */
-void
-match_init_exact(struct match *match, const struct flow *flow)
-{
- match->flow = *flow;
- match->flow.skb_priority = 0;
- flow_wildcards_init_exact(&match->wc);
-}
-
/* Initializes 'match' as a "catch-all" match that matches every packet. */
void
match_init_catchall(struct match *match)
int i;
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 20);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 21);
if (priority != OFP_DEFAULT_PRIORITY) {
ds_put_format(s, "priority=%u,", priority);