X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=7912b4b88dd5dc901d583875847498a4fe8821ce;hb=0064467516248fb3b28bdbd7d0f4e54b861627cf;hp=0162c45ab16249342d17b01930593ac725a5f3b9;hpb=8fef8c7121222233075a03d57db7e0b48d5f6be5;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 0162c45a..7912b4b8 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -197,7 +197,6 @@ netflow_expire(struct netflow *nf, const struct ofexpired *expired) uint16_t iface = (nf->engine_id & 0x7f) << 9; nf_rec->input = htons(iface | (expired->flow.in_port & 0x1ff)); nf_rec->output = htons(iface); - printf("input: %x\n", ntohs(nf_rec->input)); } else { nf_rec->input = htons(expired->flow.in_port); nf_rec->output = htons(0); @@ -222,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); } }