Skip to content

Commit d1e578b

Browse files
jukkarkrish2718
authored andcommitted
[nrf fromtree] doc: net: Add link address change info to migration guide
Add information about "struct net_linkaddr" changes to 4.2 migration guide to help the developers to handle issues if they access the net_linkaddr struct fields directly in their code. Signed-off-by: Jukka Rissanen <[email protected]> (cherry picked from commit 152a03b)
1 parent a4e01da commit d1e578b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/releases/migration-guide-4.2.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ Bluetooth Host
6060
Networking
6161
**********
6262

63+
* The struct ``net_linkaddr_storage`` has been renamed to struct
64+
:c:struct:`net_linkaddr` and the old struct ``net_linkaddr`` has been removed.
65+
The struct :c:struct:`net_linkaddr` now contains space to store the link
66+
address instead of having pointer that point to the link address. This avoids
67+
possible dangling pointers when cloning struct :c:struct:`net_pkt`. This will
68+
increase the size of struct :c:struct:`net_pkt` by 4 octets for IEEE 802.15.4,
69+
but there is no size increase for other network technologies like Ethernet.
70+
Note that any code that is using struct :c:struct:`net_linkaddr` directly, and
71+
which has checks like ``if (lladdr->addr == NULL)``, will no longer work as expected
72+
(because the addr is not a pointer) and must be changed to ``if (lladdr->len == 0)``
73+
if the code wants to check that the link address is not set.
74+
6375
Other subsystems
6476
****************
6577

0 commit comments

Comments
 (0)