From 9da8211828fc8b86ea067990c30a911e317f73d9 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Mon, 26 Jul 2010 13:48:35 +0000 Subject: [PATCH] Zero padding fields of netflow records. This helps to reduce size of compressed export logs. Requested by: Alexey Illarionov --- sys/netgraph/netflow/netflow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c index 411730a7304b..39dd9d5de60b 100644 --- a/sys/netgraph/netflow/netflow.c +++ b/sys/netgraph/netflow/netflow.c @@ -167,6 +167,7 @@ get_export_dgram(priv_p priv) dgram = mtod(m, struct netflow_v5_export_dgram *); dgram->header.count = 0; dgram->header.version = htons(NETFLOW_V5); + dgram->header.pad = 0; } @@ -644,6 +645,8 @@ export_add(item_p item, struct flow_entry *fle) rec->tos = fle->f.r.r_tos; rec->dst_mask = fle->f.dst_mask; rec->src_mask = fle->f.src_mask; + rec->pad1 = 0; + rec->pad2 = 0; /* Not supported fields. */ rec->src_as = rec->dst_as = 0;