Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit adaaa0c6 authored by Linus Lüssing's avatar Linus Lüssing Committed by Greg Kroah-Hartman
Browse files

Staging: batman-adv: only modify hna-table on active module



If we haven't set the module to MODULE_ACTIVE state before (in general,
no interface has yet been added to batman-adv) then the hna table is not
initialised yet. If the kernel changes the mac address of the bat0
interface at this moment then an hna_local_add() called by interface_set_mac_addr()
then resulted in a null pointer derefernce. With this patch we are now
explicitly checking before if the state is MODULE_ACTIVE right now so
that we can assume having an initialised hna table.

Signed-off-by: default avatarLinus Lüssing <linus.luessing@web.de>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent de37cd49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment