From: Felix Fietkau Date: Fri, 27 Aug 2010 19:09:36 +0000 (+0200) Subject: respond to arp requests to the local address X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bdc7dd27a9f4774d725b64e733ea45e9679b36cd;p=project%2Frelayd.git respond to arp requests to the local address --- diff --git a/main.c b/main.c index 8fbbed2..c30526e 100644 --- a/main.c +++ b/main.c @@ -345,6 +345,11 @@ static void recv_arp_request(struct relayd_interface *rif, struct arp_packet *pk if (!memcmp(pkt->arp.arp_spa, "\x00\x00\x00\x00", 4)) return; + if (local_route_table && !memcmp(pkt->arp.arp_tpa, local_addr, sizeof(local_addr))) { + send_arp_reply(rif, local_addr, pkt->arp.arp_sha, pkt->arp.arp_spa); + return; + } + relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa); host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa);