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");