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:
3f423fe
)
Learn the ARP entry of the DHCP server directly from the DHCP response
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 11 Aug 2010 02:12:17 +0000
(
04:12
+0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 11 Aug 2010 02:12:17 +0000
(
04:12
+0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index f0630aef0709e943cafacb4ba4ca66342427b770..a29be2c1e733830c787e7680ac3faeba2e25eb4f 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-536,6
+536,9
@@
static bool forward_dhcp_packet(struct relayd_interface *rif, void *data, int le
if (!forward_dhcp)
return true;
+ if (dhcp->op == 2)
+ refresh_host(rif, pkt->eth.ether_shost, (void *) &pkt->iph.saddr);
+
DPRINTF(2, "%s: handling DHCP %s\n", rif->ifname, (dhcp->op == 1 ? "request" : "response"));
dhcp->flags |= htons(DHCP_FLAG_BROADCAST);