OSDN Git Service

batman-adv: avoid DAT to mess up LAN state
authorAntonio Quartulli <antonio@meshcoding.com>
Tue, 16 Jun 2015 19:06:24 +0000 (21:06 +0200)
committerAntonio Quartulli <antonio@meshcoding.com>
Tue, 4 Aug 2015 22:31:46 +0000 (00:31 +0200)
commitf202a666e933f3c7557126d63833a6a3b577ac15
tree3ea769ee1378f220cf6eab6c760caf3910c24008
parent2475b22526d70234ecfe4a1ff88aed69badefba9
batman-adv: avoid DAT to mess up LAN state

When a node running DAT receives an ARP request from the LAN for the
first time, it is likely that this node will request the ARP entry
through the distributed ARP table (DAT) in the mesh.

Once a DAT reply is received the asking node must check if the MAC
address for which the IP address has been asked is local. If it is, the
node must drop the ARP reply bceause the client should have replied on
its own locally.

Forwarding this reply means fooling any L2 bridge (e.g. Ethernet
switches) lying between the batman-adv node and the LAN. This happens
because the L2 bridge will think that the client sending the ARP reply
lies somewhere in the mesh, while this node is sitting in the same LAN.

Reported-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/distributed-arp-table.c