aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2012-01-22 20:00:23 +0100
committerAntonio Quartulli <ordex@autistici.org>2012-04-11 14:28:59 +0200
commit20ff9d593f8ff20c2ef24498f77a8bc30b3a059a (patch)
treee64f51254b230d9d6441e09a2c81fbcb68dcf2d6 /net/batman-adv/routing.c
parentbatman-adv: allow multiple entries in tt_global_entries (diff)
downloadlinux-dev-20ff9d593f8ff20c2ef24498f77a8bc30b3a059a.tar.xz
linux-dev-20ff9d593f8ff20c2ef24498f77a8bc30b3a059a.zip
batman-adv: don't let backbone gateways exchange tt entries
As the backbone gateways are connected to the same backbone, they should announce the same clients on the backbone non-exclusively. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index a1d8c9b0f902..1d1fd04c9c3a 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -673,6 +673,13 @@ int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if)
if (!is_my_mac(roam_adv_packet->dst))
return route_unicast_packet(skb, recv_if);
+ /* check if it is a backbone gateway. we don't accept
+ * roaming advertisement from it, as it has the same
+ * entries as we have.
+ */
+ if (bla_is_backbone_gw_orig(bat_priv, roam_adv_packet->src))
+ goto out;
+
orig_node = orig_hash_find(bat_priv, roam_adv_packet->src);
if (!orig_node)
goto out;