From c8f8527d556351d5dc341d4a3be79b2c7fe2bde4 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Wed, 14 Dec 2016 12:52:59 +0100 Subject: [PATCH] net: ieee802154: ACK reply needs to set all FCF attributes. That bug never got caught because the buffer in unit test is always clean and fully initialized to 0, and that part of the code being tested is never used in real as the ACK reply is directly made by the chip. Change-Id: I88c4dd3767b4addf2250165b94f49fae29d322ea Signed-off-by: Tomasz Bursztyka --- subsys/net/ip/l2/ieee802154/ieee802154_frame.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subsys/net/ip/l2/ieee802154/ieee802154_frame.c b/subsys/net/ip/l2/ieee802154/ieee802154_frame.c index 74cd80e6316..66f88c4ca15 100644 --- a/subsys/net/ip/l2/ieee802154/ieee802154_frame.c +++ b/subsys/net/ip/l2/ieee802154/ieee802154_frame.c @@ -708,6 +708,9 @@ bool ieee802154_create_ack_frame(struct net_if *iface, fs = generate_fcf_grounds(&p_buf, 0); + fs->fc.dst_addr_mode = 0; + fs->fc.src_addr_mode = 0; + fs->fc.frame_type = IEEE802154_FRAME_TYPE_ACK; fs->sequence = seq;