X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=secchan%2Fnetflow.c;h=7912b4b88dd5dc901d583875847498a4fe8821ce;hb=cdd35cff225bf39767ea9e2e535cf2940b0e5127;hp=7dd2e043136b8e80d4079fc16cc3a7c36ba3c694;hpb=f91f0811394774826631aa22e5b50b27acbb5c46;p=openvswitch diff --git a/secchan/netflow.c b/secchan/netflow.c index 7dd2e043..7912b4b8 100644 --- a/secchan/netflow.c +++ b/secchan/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); } }