Source
1427
1427
* most probably an ARP reply generated by another node of the DHT.
1428
1428
* We have most probably received already a reply earlier. Delivering
1429
1429
* this frame would lead to doubled receive of an ARP reply.
1430
1430
*/
1431
1431
dat_entry = batadv_dat_entry_hash_find(bat_priv, ip_src, vid);
1432
1432
if (dat_entry && batadv_compare_eth(hw_src, dat_entry->mac_addr)) {
1433
1433
batadv_dbg(BATADV_DBG_DAT, bat_priv, "Doubled ARP reply removed: ARP MSG = [src: %pM-%pI4 dst: %pM-%pI4]; dat_entry: %pM-%pI4\n",
1434
1434
hw_src, &ip_src, hw_dst, &ip_dst,
1435
1435
dat_entry->mac_addr, &dat_entry->ip);
1436
1436
dropped = true;
1437
-
goto out;
1438
1437
}
1439
1438
1440
1439
/* Update our internal cache with both the IP addresses the node got
1441
1440
* within the ARP reply
1442
1441
*/
1443
1442
batadv_dat_entry_add(bat_priv, ip_src, hw_src, vid);
1444
1443
batadv_dat_entry_add(bat_priv, ip_dst, hw_dst, vid);
1445
1444
1445
+
if (dropped)
1446
+
goto out;
1447
+
1446
1448
/* If BLA is enabled, only forward ARP replies if we have claimed the
1447
1449
* source of the ARP reply or if no one else of the same backbone has
1448
1450
* already claimed that client. This prevents that different gateways
1449
1451
* to the same backbone all forward the ARP reply leading to multiple
1450
1452
* replies in the backbone.
1451
1453
*/
1452
1454
if (!batadv_bla_check_claim(bat_priv, hw_src, vid)) {
1453
1455
batadv_dbg(BATADV_DBG_DAT, bat_priv,
1454
1456
"Device %pM claimed by another backbone gw. Drop ARP reply.\n",
1455
1457
hw_src);