X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=7912b4b88dd5dc901d583875847498a4fe8821ce;hb=1c617a495fdc6bb91e29bf00df4c837f63d63199;hp=7dd2e043136b8e80d4079fc16cc3a7c36ba3c694;hpb=4d678233e981fa319a338f6b0949e9dc625941a4;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 7dd2e043..7912b4b8 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -221,9 +221,8 @@ netflow_expire(struct netflow *nf, const struct ofexpired *expired) nf_rec->ip_proto = expired->flow.nw_proto; nf_rec->ip_tos = expired->ip_tos; - /* NetFlow messages are limited to 30 records. A length of 1400 - * bytes guarantees that the limit is not exceeded. */ - if (nf->packet.size >= 1400) { + /* NetFlow messages are limited to 30 records. */ + if (ntohs(nf_hdr->count) >= 30) { netflow_run(nf); } }