drivers: net: ppp: Fix link-layer address configuration
Restore setting the ppp link-local address either to CONFIG_PPP_MAC_ADDR or to a random value 00:00:5e:00:53:XX instead of leaving it uninitialized. Recently the memory handling for the link-layer addresses was changed from an approach of copying pointers to managing the memory as a member of the `net_linkaddr` struct (ref ac3cb9da). The piece of code this patch touches however, relied on the use of the pointers to function properly. With the recent change, the MAC address was copied to the new member location before it was even set (either from Kconfig or selected randomly). As a result, the link-layer address was kept initialized to zero, which resulted in a IPv6 address of fe80::ff:fe00:0 which is exactly the link-local EUI-64 representation of the MAC address 00:00:00:00:00:00 (without flipping the "universal/local" bit). Signed-off-by:Marc Lasch <marc.lasch@husqvarnagroup.com> (cherry picked from commit 15048337)
Loading
Please sign in to comment