Skip to content
Commit fb8d7625 authored by Sebastien Griffoul's avatar Sebastien Griffoul Committed by Jukka Rissanen
Browse files

net: ipv6: Fix net_set_mac function



The ethernet driver calls net_set_mac before net_init is
called (ie before the uip stack has been fully initialized).
Unfortunately net_set_mac calls the function uip_ds6_set_lladdr.
Therefore this function is called before uip_ds6_init: this is an
issue as uip_ds6_set_lladdr is setting some static data which are
going to be erased by uip_ds6_init. In some case it could even lead
to a system hang due to a timer set twice.

To fix this issue net_set_mac should check whether net_init has been
already called. If not net_set_mac should simply copies the mac
address into uip_lladdr. Indeed uip_ds6_init automatically calls
uip_ds6_set_lladdr for the address stored into uip_lladdr.

Change-Id: Ifbcb07e7cd493b6284a85d70f2439d434cebbb00
Signed-off-by: default avatarSebastien Griffoul <sebastien.griffoul@intel.com>
parent 57cd9939
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment