use requests only for creating new host entries, not for refreshing them
[project/relayd.git] / main.c
diff --git a/main.c b/main.c
index 9361c97..2f3bae8 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);