From bdc7dd27a9f4774d725b64e733ea45e9679b36cd Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 27 Aug 2010 21:09:36 +0200 Subject: [PATCH] respond to arp requests to the local address --- main.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.30.2