Staging: batman-adv: only modify hna-table on active module
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: Linus Lüssing <1dd561f221e05f08425aa0351cbf66864fb4804d@web.de>
Signed-off-by: Marek Lindner <104240d543ffdbcddd3f116d866dc6166bffcd7a@yahoo.de>
Signed-off-by: Andrew Lunn <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@suse.de>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas