]> git.karo-electronics.de Git - karo-tx-linux.git/commit
batman-adv: prevent duplication of ARP replies when DAT is used
authorAndreas Pape <APape@phoenixcontact.com>
Mon, 5 Sep 2016 11:20:26 +0000 (13:20 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Wed, 22 Mar 2017 09:30:53 +0000 (10:30 +0100)
commit9aa5cd79b5abde1d0ebcff825726e242e0b7efea
tree9efc9ec2d18e0513e2238715493812869a1be0b9
parent00311de5fbf998877f2c3109688857a99f45fdd8
batman-adv: prevent duplication of ARP replies when DAT is used

If none of the backbone gateways in a bla setup has already knowledge of
the mac address searched for in an incoming ARP request from the backbone
an address resolution via the DHT of DAT is started. The gateway can send
several ARP requests to different DHT nodes and therefore can get several
replies. This patch assures that not all of the possible ARP replies are
returned to the backbone by checking the local DAT cache of the gateway.
If there is an entry in the local cache the gateway has already learned
the requested address and there is no need to forward the additional reply
to the backbone.
Furthermore it is checked if this gateway has claimed the source of the ARP
reply and only forwards it to the backbone if it has claimed the source or
if there is no claim at all.

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>
net/batman-adv/distributed-arp-table.c