This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 8f1a8add29dc105672659c9a8b4ae53dc1971d51 Author: raiden00pl <[email protected]> AuthorDate: Thu Oct 22 17:47:04 2026 +0200 wireless/ieee802154/libmac: fix the disassociation and orphan requests sixlowpan_disassoc_req() was defined as sixlowpan_desassoc_req(), and the orphan response functions passed an uninitialized argument to the MAC. Assisted-by: Claude Code Signed-off-by: raiden00pl <[email protected]> --- wireless/ieee802154/libmac/ieee802154_orphanresp.c | 2 ++ wireless/ieee802154/libmac/sixlowpan_disassocreq.c | 2 +- wireless/ieee802154/libmac/sixlowpan_orphanresp.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wireless/ieee802154/libmac/ieee802154_orphanresp.c b/wireless/ieee802154/libmac/ieee802154_orphanresp.c index b997091d5..80ac0f130 100644 --- a/wireless/ieee802154/libmac/ieee802154_orphanresp.c +++ b/wireless/ieee802154/libmac/ieee802154_orphanresp.c @@ -46,6 +46,8 @@ int ieee802154_orphan_resp(int fd, FAR struct ieee802154_orphan_resp_s *resp) union ieee802154_macarg_u arg; int ret; + memcpy(&arg.orphanresp, resp, sizeof(struct ieee802154_orphan_resp_s)); + ret = ioctl(fd, MAC802154IOC_MLME_ORPHAN_RESPONSE, (unsigned long)((uintptr_t)&arg)); if (ret < 0) diff --git a/wireless/ieee802154/libmac/sixlowpan_disassocreq.c b/wireless/ieee802154/libmac/sixlowpan_disassocreq.c index 8582379d3..b9dd97ffc 100644 --- a/wireless/ieee802154/libmac/sixlowpan_disassocreq.c +++ b/wireless/ieee802154/libmac/sixlowpan_disassocreq.c @@ -41,7 +41,7 @@ * Public Functions ****************************************************************************/ -int sixlowpan_desassoc_req(int sock, FAR const char *ifname, +int sixlowpan_disassoc_req(int sock, FAR const char *ifname, FAR const struct ieee802154_disassoc_req_s *req) { struct ieee802154_netmac_s arg; diff --git a/wireless/ieee802154/libmac/sixlowpan_orphanresp.c b/wireless/ieee802154/libmac/sixlowpan_orphanresp.c index decb4b58d..0f2d1b1a2 100644 --- a/wireless/ieee802154/libmac/sixlowpan_orphanresp.c +++ b/wireless/ieee802154/libmac/sixlowpan_orphanresp.c @@ -48,6 +48,7 @@ int sixlowpan_orphan_resp(int sock, FAR const char *ifname, int ret; strlcpy(arg.ifr_name, ifname, IFNAMSIZ); + memcpy(&arg.u.orphanresp, resp, sizeof(struct ieee802154_orphan_resp_s)); ret = ioctl(sock, MAC802154IOC_MLME_ORPHAN_RESPONSE, (unsigned long)((uintptr_t)&arg));
