projects
/
project
/
relayd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac87fbc
)
respond to arp requests to the local address
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 27 Aug 2010 19:09:36 +0000
(21:09 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 27 Aug 2010 19:09:36 +0000
(21:09 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 8fbbed2e44804e723cc31277b9a689b97651725d..c30526ef2cdd9963531f044ceaac09538d5f742d 100644
(file)
--- 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);