Problem openWRT "backfire" and "kmod-batman-adv"

Message ID
State RFC, archived
Commit e3a0cc90940915dd14e4ca6bdab6d74bbc60f4a4

Commit Message

Sven Eckelmann Aug. 20, 2010, 3:38 p.m. UTC
  Sven Eckelmann wrote:
> I haven't wrote that code... so it may take a little bit until I feel in
> the right mood to hunt it real down.

Ok, could you please try the attached patch? Just add it to the other patches 
(you can omit 03-... after a successful test. But it may reveal interesting 
information if that wasn't the actual problem). Don't forget to cleanup your 
openwrt build environment.

Best regards,


diff --git a/hard-interface.c b/hard-interface.c
index 60e8a56..65a4a54 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -129,6 +129,9 @@  static bool hardif_is_iface_up(struct batman_if *batman_if)
 static void update_mac_addresses(struct batman_if *batman_if)
+	if (!batman_if || !batman_if->packet_buff)
+		return;
 	addr_to_string(batman_if->addr_str, batman_if->net_dev->dev_addr);
 	memcpy(((struct batman_packet *)(batman_if->packet_buff))->orig,
@@ -339,6 +342,7 @@  static struct batman_if *hardif_add_interface(struct net_device *net_dev)
 	batman_if->if_num = -1;
 	batman_if->net_dev = net_dev;
 	batman_if->if_status = IF_NOT_IN_USE;
+	batman_if->packet_buff = NULL;