summaryrefslogtreecommitdiff
path: root/ofproto/netflow.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2013-06-18 23:55:47 -0700
committerJustin Pettit <jpettit@nicira.com>2013-06-19 22:49:51 -0700
commit1dd35f8afe13fe2e9144052b2d61086e5be6e448 (patch)
treecbf8342c134345708bf025b8ea43e8dea01aa650 /ofproto/netflow.c
parent875b94edc739a8c09fe195001c34a97d81baa670 (diff)
downloadopenvswitch-1dd35f8afe13fe2e9144052b2d61086e5be6e448.tar.gz
ofproto-dpif: Tighten up megaflow wildcard handling.
A number of use-cases weren't handled properly when determining what can be wildcarded for megaflows. This commit both catches additional fields that cannot be wildcarded and loosens a few other cases. Bug #17979 Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ofproto/netflow.c')
-rw-r--r--ofproto/netflow.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ofproto/netflow.c b/ofproto/netflow.c
index 7366986f6..7efb02678 100644
--- a/ofproto/netflow.c
+++ b/ofproto/netflow.c
@@ -51,6 +51,18 @@ struct netflow {
long long int reconfig_time; /* When we reconfigured the timeouts. */
};
+void
+netflow_mask_wc(struct flow_wildcards *wc)
+{
+ memset(&wc->masks.dl_type, 0xff, sizeof wc->masks.dl_type);
+ memset(&wc->masks.nw_proto, 0xff, sizeof wc->masks.nw_proto);
+ memset(&wc->masks.nw_src, 0xff, sizeof wc->masks.nw_src);
+ memset(&wc->masks.nw_dst, 0xff, sizeof wc->masks.nw_dst);
+ memset(&wc->masks.tp_src, 0xff, sizeof wc->masks.tp_src);
+ memset(&wc->masks.tp_dst, 0xff, sizeof wc->masks.tp_dst);
+ wc->masks.nw_tos |= IP_DSCP_MASK;
+}
+
static void
gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow,
struct ofexpired *expired,