From: Felix Fietkau Date: Fri, 27 Aug 2010 19:43:39 +0000 (+0200) Subject: use requests only for creating new host entries, not for refreshing them X-Git-Url: http://git.archive.openwrt.org/modules/nixio.html?a=commitdiff_plain;h=d515c3bc3b1eb92c4ae9f5e8f51ea3886b8d2d2f;p=project%2Frelayd.git use requests only for creating new host entries, not for refreshing them --- diff --git a/main.c b/main.c index 9361c97..2f3bae8 100644 --- 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);