[commits] r1753 - trunk/batman-adv

postmaster at open-mesh.org postmaster at open-mesh.org
Sun Aug 1 16:32:30 CEST 2010


Author: marek
Date: 2010-08-01 16:31:56 +0200 (Sun, 01 Aug 2010)
New Revision: 1753

Modified:
   trunk/batman-adv/send.c
Log:
batman-adv: propagate gateway flags via the main OGM only

If the gateway flags are progatated via all OGMs a node sends out
nearby nodes will believe to 'see' several gateways although it is
the same node.

Signed-off-by: Marek Lindner <lindner_marek at yahoo.de>

Modified: trunk/batman-adv/send.c
===================================================================
--- trunk/batman-adv/send.c	2010-08-01 14:31:54 UTC (rev 1752)
+++ trunk/batman-adv/send.c	2010-08-01 14:31:56 UTC (rev 1753)
@@ -295,7 +295,8 @@
 	else
 		batman_packet->flags &= ~VIS_SERVER;
 
-	if (atomic_read(&bat_priv->gw_mode) == GW_MODE_SERVER)
+	if ((batman_if == bat_priv->primary_if) &&
+	    (atomic_read(&bat_priv->gw_mode) == GW_MODE_SERVER))
 		batman_packet->gw_flags =
 				(uint8_t)atomic_read(&bat_priv->gw_class);
 	else



More information about the commits mailing list