batman-adv: 2014.1.0 bugfixes & stability updates
[feed/routing.git] / batman-adv / patches / 0005-batman-adv-fix-local-TT-check-for-outgoing-arp-reque.patch
1 From 1c2e700fa93e6de3a2ae3725cf437504683b894a Mon Sep 17 00:00:00 2001
2 From: Antonio Quartulli <antonio@open-mesh.com>
3 Date: Sat, 29 Mar 2014 17:27:38 +0100
4 Subject: [PATCH 5/6] batman-adv: fix local TT check for outgoing arp requests
5 in DAT
6
7 Change introduced by d6bd8b36fa1f3d72a6fd5942a6e9bde6ddafcd0d
8 ("batman-adv: make DAT drop ARP requests targeting local clients")
9 implements a check that prevents DAT from using the caching
10 mechanism when the client that is supposed to provide a reply
11 to an arp request is local.
12
13 However change brought by 3e26722bc9f248ec4316749fc1957365c0fa5e4b
14 ("batman-adv: make the Distributed ARP Table vlan aware")
15 has not converted the above check into its vlan aware version
16 thus making it useless when the local client is behind a vlan.
17
18 Fix the behaviour by properly specifying the vlan when
19 checking for a client being local or not.
20
21 Reported-by: Simon Wunderlich <simon@open-mesh.com>
22 Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
23 Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
24 ---
25 distributed-arp-table.c | 3 +--
26 1 file changed, 1 insertion(+), 2 deletions(-)
27
28 diff --git a/distributed-arp-table.c b/distributed-arp-table.c
29 index 5bb37a8..a5d75be 100644
30 --- a/distributed-arp-table.c
31 +++ b/distributed-arp-table.c
32 @@ -940,8 +940,7 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
33 * additional DAT answer may trigger kernel warnings about
34 * a packet coming from the wrong port.
35 */
36 - if (batadv_is_my_client(bat_priv, dat_entry->mac_addr,
37 - BATADV_NO_FLAGS)) {
38 + if (batadv_is_my_client(bat_priv, dat_entry->mac_addr, vid)) {
39 ret = true;
40 goto out;
41 }
42 --
43 1.9.0
44