diff options
author | Motonori Shindo <motonori@shin.do> | 2014-11-05 01:12:18 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-11-04 10:40:08 -0800 |
commit | 2c90878611d3f9d8722f068861d4d716f77b146e (patch) | |
tree | eaf3a46d247ca0bc723716a7a6840b245547d459 /ofproto/netflow.c | |
parent | 495a6c342b3fc38c375b20cd2dcd9b9ac9017b64 (diff) | |
download | openvswitch-2c90878611d3f9d8722f068861d4d716f77b146e.tar.gz |
netflow: Fix interpretation of flow_seq.
'flow_seq" field in NetFlow v5 header should represent a number of NetFlow
flow records exported while it is representing the number of NetFlow
packets exported in the current code. This patch fixes this problem.
Signed-off-by: Motonori Shindo <motonori@shin.do>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ofproto/netflow.c')
-rw-r--r-- | ofproto/netflow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 5ab522f84..5b1c8fe59 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -121,7 +121,6 @@ gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow, nf_hdr->sysuptime = htonl(time_msec() - nf->boot_time); nf_hdr->unix_secs = htonl(now.tv_sec); nf_hdr->unix_nsecs = htonl(now.tv_nsec); - nf_hdr->flow_seq = htonl(nf->netflow_cnt++); nf_hdr->engine_type = nf->engine_type; nf_hdr->engine_id = nf->engine_id; nf_hdr->sampling_interval = htons(0); @@ -129,6 +128,7 @@ gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow, nf_hdr = ofpbuf_data(&nf->packet); nf_hdr->count = htons(ntohs(nf_hdr->count) + 1); + nf_hdr->flow_seq = htonl(nf->netflow_cnt++); nf_rec = ofpbuf_put_zeros(&nf->packet, sizeof *nf_rec); nf_rec->src_addr = nf_flow->nw_src; |