From ace8a29e7d489cab88efe6529280c4f01761207a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 2 Nov 2019 18:58:00 +0100 Subject: [PATCH] Probably something I have not yet understood... --- src/algo_dup2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algo_dup2.c b/src/algo_dup2.c index b578749..6045c8d 100644 --- a/src/algo_dup2.c +++ b/src/algo_dup2.c @@ -82,11 +82,11 @@ int algo_dup2_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdin dup2c->emit_id = dup2c->emit_id + 1; union abstract_packet metadata = { .fmt.headers.cmd = CMD_UDP_METADATA_THUNDER, - .fmt.headers.size = sizeof(metadata.fmt.headers) + sizeof(metadata.fmt.content.udp_metadata_thunder), + .fmt.headers.size = sizeof(metadata), .fmt.headers.flags = 0, .fmt.content.udp_metadata_thunder.id = dup2c->emit_id }; - buffer_append_ap (bp, &metadata); + union abstract_packet *apbuf = buffer_append_ap (bp, &metadata); if (ctx->verbose > 1) { dump_buffer_packet(bp); fprintf(stderr, " [algo_dup2] Added metadata\n");