From a07ffa265e9c29198ca4158148880659ffc781e1 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sun, 22 Sep 2024 15:28:24 +0200 Subject: [PATCH] connection: use correct addresses for empty packets --- impl/src/layer2/connection.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/impl/src/layer2/connection.c b/impl/src/layer2/connection.c index 12a6bbe..2c458e4 100644 --- a/impl/src/layer2/connection.c +++ b/impl/src/layer2/connection.c @@ -239,10 +239,8 @@ result_t connection_add_empty_packet(connection_ctx_t *ctx, bool tx_request) layer2_packet_header_t header; - header.dst_addr.addr[0] = 0xFFFF; - header.dst_addr.length = 1; - header.src_addr.addr[0] = 0x0001; - header.src_addr.length = 1; + header.dst_addr = ctx->peer_addr; + header.src_addr = ctx->my_addr; header.msg_type = L2_MSG_TYPE_EMPTY; header.rx_seq_nr = 0; // will be filled in layer2_tx_encode_next_packet() header.tx_seq_nr = 0; // not used in empty packets