use requests only for creating new host entries, not for refreshing them
authorFelix Fietkau <nbd@openwrt.org>
Fri, 27 Aug 2010 19:43:39 +0000 (21:43 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 27 Aug 2010 19:43:39 +0000 (21:43 +0200)
main.c

diff --git a/main.c b/main.c
index 9361c97febd4cfa21caadcb31479be448095b84e..2f3bae855be804c6b26ef2e03dde1579a63f5e2f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -360,7 +360,9 @@ static void recv_arp_request(struct relayd_interface *rif, struct arp_packet *pk
                return;
        }
 
-       relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa);
+       host = find_host_by_ipaddr(NULL, pkt->arp.arp_spa);
+       if (!host || host->rif != rif)
+               relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa);
 
        host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa);