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

Message ID 201008141926.57132.lindner_marek@yahoo.de (mailing list archive)
State RFC, archived
Headers

Commit Message

Marek Lindner Aug. 14, 2010, 5:26 p.m. UTC
  On Thursday 12 August 2010 20:04:47 Tim Glaremin wrote:
> Hope it helps.... The part Marek quoted at least did change :)

Yes, it did.

Could you please copy the attached patch into your batman-advanced patches 
folder and verify whether it fixes your problem ? This document explains the 
location of that folder and how to rebuild the package:
http://www.open-mesh.org/wiki/building-batman-adv-with-openwrt

Regards,
Marek
  

Patch

--- a/hard-interface.c
+++ b/hard-interface.c
@@ -457,15 +457,24 @@  static int hard_if_event(struct notifier_block *this,
 	struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
 	struct bat_priv *bat_priv;
 
-	if (!batman_if)
-		batman_if = hardif_add_interface(net_dev);
+	if (!batman_if) {
+		switch (event) {
+		case NETDEV_REGISTER:
+		case NETDEV_UP:
+		case NETDEV_GOING_DOWN:
+		case NETDEV_DOWN:
+		case NETDEV_CHANGENAME:
+		case NETDEV_CHANGEADDR:
+			batman_if = hardif_add_interface(net_dev);
+		default:
+				break;
+		}
+	}
 
 	if (!batman_if)
 		goto out;
 
 	switch (event) {
-	case NETDEV_REGISTER:
-		break;
 	case NETDEV_UP:
 		hardif_activate_interface(batman_if);
 		break;
@@ -476,8 +485,6 @@  static int hard_if_event(struct notifier_block *this,
 	case NETDEV_UNREGISTER:
 		hardif_remove_interface(batman_if);
 		break;
-	case NETDEV_CHANGENAME:
-		break;
 	case NETDEV_CHANGEADDR:
 		if (batman_if->if_status == IF_NOT_IN_USE)
 			goto out;
-- 
1.7.1