From 45b20cb8bc5fef702d44631d74be1e203f334947 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 14 May 2009 16:21:03 -0700 Subject: [PATCH] netflow: Document 1400-byte packet length limit. The NetFlow code accumulates records until the packet is 1400 bytes or some amount of time has passed. This just adds a comment that NetFlow messages are limited to 30 records, which places a ceiling on how large the message can be (1400 is below that ceiling). --- secchan/netflow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/secchan/netflow.c b/secchan/netflow.c index dc83a9b0..b68a51ca 100644 --- a/secchan/netflow.c +++ b/secchan/netflow.c @@ -227,6 +227,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_run(nf); } -- 2.30.2