aboutsummaryrefslogtreecommitdiffstats
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 14:38:19 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-07-05 18:08:46 -0400
commit2d3f6ccc4ea5c74d4b4af1b47c56b4cff4bbfcb7 (patch)
tree266d06843fa025def68bc00f56ab5912247f15cc /net/batman-adv/bridge_loop_avoidance.h
parent9e85a6f9dc231f3ed3c1dc1b12217505d970142a (diff)
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 e39f93acc28..dc5227b398d 100644
--- a/net/batman-adv/bridge_loop_avoidance.h
+++ b/net/batman-adv/bridge_loop_avoidance.h
@@ -23,7 +23,8 @@
23#define _NET_BATMAN_ADV_BLA_H_ 23#define _NET_BATMAN_ADV_BLA_H_
24 24
25#ifdef CONFIG_BATMAN_ADV_BLA 25#ifdef CONFIG_BATMAN_ADV_BLA
26int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid); 26int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid,
27 bool is_bcast);
27int bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid); 28int bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid);
28int bla_is_backbone_gw(struct sk_buff *skb, 29int bla_is_backbone_gw(struct sk_buff *skb,
29 struct orig_node *orig_node, int hdr_size); 30 struct orig_node *orig_node, int hdr_size);
@@ -41,7 +42,7 @@ void bla_free(struct bat_priv *bat_priv);
41#else /* ifdef CONFIG_BATMAN_ADV_BLA */ 42#else /* ifdef CONFIG_BATMAN_ADV_BLA */
42 43
43static inline int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, 44static inline int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb,
44 short vid) 45 short vid, bool is_bcast)
45{ 46{
46 return 0; 47 return 0;
47} 48}