summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bridge_loop_avoidance.h
diff options
context:
space:
mode:
authorAndreas Pape <APape@phoenixcontact.com>2016-09-05 13:20:25 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2017-03-22 10:30:53 +0100
commit00311de5fbf998877f2c3109688857a99f45fdd8 (patch)
treeb9cfc2c80edadc5e893bb46f94eb76f9a165c1c3 /net/batman-adv/bridge_loop_avoidance.h
parentbatman-adv: Omit unnecessary memset of netdev private data (diff)
downloadlinux-00311de5fbf998877f2c3109688857a99f45fdd8.tar.xz
linux-00311de5fbf998877f2c3109688857a99f45fdd8.zip
batman-adv: prevent multiple ARP replies sent by gateways if dat enabled
If dat is enabled it must be made sure that only the backbone gw which has claimed the remote destination for the ARP request answers the ARP request directly if the MAC address is known due to the local dat table. This prevents multiple ARP replies in a common backbone if more than one gateway already knows the remote mac searched for in the ARP request. Signed-off-by: Andreas Pape <apape@phoenixcontact.com> Acked-by: Simon Wunderlich <sw@simonwunderlich.de> [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.h')
-rw-r--r--net/batman-adv/bridge_loop_avoidance.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.h b/net/batman-adv/bridge_loop_avoidance.h
index e157986bd01c..234775748b8e 100644
--- a/net/batman-adv/bridge_loop_avoidance.h
+++ b/net/batman-adv/bridge_loop_avoidance.h
@@ -69,6 +69,10 @@ void batadv_bla_status_update(struct net_device *net_dev);
int batadv_bla_init(struct batadv_priv *bat_priv);
void batadv_bla_free(struct batadv_priv *bat_priv);
int batadv_bla_claim_dump(struct sk_buff *msg, struct netlink_callback *cb);
+#ifdef CONFIG_BATMAN_ADV_DAT
+bool batadv_bla_check_claim(struct batadv_priv *bat_priv, u8 *addr,
+ unsigned short vid);
+#endif
#define BATADV_BLA_CRC_INIT 0
#else /* ifdef CONFIG_BATMAN_ADV_BLA */
@@ -145,6 +149,13 @@ static inline int batadv_bla_backbone_dump(struct sk_buff *msg,
return -EOPNOTSUPP;
}
+static inline
+bool batadv_bla_check_claim(struct batadv_priv *bat_priv, u8 *addr,
+ unsigned short vid)
+{
+ return true;
+}
+
#endif /* ifdef CONFIG_BATMAN_ADV_BLA */
#endif /* ifndef _NET_BATMAN_ADV_BLA_H_ */