summaryrefslogtreecommitdiff
path: root/net/batman-adv/bridge_loop_avoidance.h
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2012-07-04 22:38:19 +0400
committerAntonio Quartulli <ordex@autistici.org>2012-07-06 02:08:46 +0400
commit2d3f6ccc4ea5c74d4b4af1b47c56b4cff4bbfcb7 (patch)
tree266d06843fa025def68bc00f56ab5912247f15cc /net/batman-adv/bridge_loop_avoidance.h
parent9e85a6f9dc231f3ed3c1dc1b12217505d970142a (diff)
downloadlinux-2d3f6ccc4ea5c74d4b4af1b47c56b4cff4bbfcb7.tar.xz
batman-adv: check incoming packet type for bla
If the gateway functionality is used, some broadcast packets (DHCP requests) may be transmitted as unicast packets. As the bridge loop avoidance code now only considers the payload Ethernet destination, it may drop the DHCP request for clients which are claimed by other backbone gateways, because it falsely infers from the broadcast address that the right backbone gateway should havehandled the broadcast. Fix this by checking and delegating the batman-adv packet type used for transmission. Reported-by: Guido Iribarren <guidoiribarren@buenosaireslibre.org> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.h')
-rw-r--r--net/batman-adv/bridge_loop_avoidance.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.h b/net/batman-adv/bridge_loop_avoidance.h
index e39f93acc28f..dc5227b398d4 100644
--- a/net/batman-adv/bridge_loop_avoidance.h
+++ b/net/batman-adv/bridge_loop_avoidance.h
@@ -23,7 +23,8 @@
#define _NET_BATMAN_ADV_BLA_H_
#ifdef CONFIG_BATMAN_ADV_BLA
-int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid);
+int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid,
+ bool is_bcast);
int bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid);
int bla_is_backbone_gw(struct sk_buff *skb,
struct orig_node *orig_node, int hdr_size);
@@ -41,7 +42,7 @@ void bla_free(struct bat_priv *bat_priv);
#else /* ifdef CONFIG_BATMAN_ADV_BLA */
static inline int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb,
- short vid)
+ short vid, bool is_bcast)
{
return 0;
}