• Andreas Pape's avatar
    batman-adv: prevent duplication of ARP replies when DAT is used · 9aa5cd79
    Andreas Pape authored
    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: default avatarAndreas Pape <apape@phoenixcontact.com>
    Acked-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
    [sven@narfation.org: fix conflicts with current version]
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
    9aa5cd79
distributed-arp-table.c 37.6 KB