summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-11-02 18:37:56 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-03 13:29:13 +0000
commit393252a6b1757690fb83ce744e8e63af46a64453 (patch)
tree438f554a6f2060f14b82357c29d8fe32ba3c5b63 /vnet
parented4a2fdd4d62c46a2237157cd3a72bda16fceb6a (diff)
Timestamp now a 64-bit integer: ns since 1/1/1970
Properly initialize allocated buffers Change-Id: Ib2005e605c89a164a4856790db6968fcd7520f5c Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/flow/flow_report.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vnet/vnet/flow/flow_report.c b/vnet/vnet/flow/flow_report.c
index 6750105c559..46333288436 100644
--- a/vnet/vnet/flow/flow_report.c
+++ b/vnet/vnet/flow/flow_report.c
@@ -78,6 +78,7 @@ int send_template_packet (flow_report_main_t *frm,
udp_header_t * udp;
vlib_main_t * vm = frm->vlib_main;
flow_report_stream_t * stream;
+ vlib_buffer_free_list_t *fl;
ASSERT (buffer_indexp);
@@ -109,6 +110,11 @@ int send_template_packet (flow_report_main_t *frm,
b0 = vlib_get_buffer (vm, bi0);
+ /* Initialize the buffer */
+ fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
+ vlib_buffer_init_for_free_list (b0, fl);
+ VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
+
ASSERT (vec_len (fr->rewrite) < VLIB_BUFFER_DEFAULT_FREE_LIST_BYTES);
clib_memcpy (b0->data, fr->rewrite, vec_len (fr->rewrite));