From fba3e8d167c037bdbb29ea79c483c10b8f9f2d02 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 11 Aug 2010 04:12:17 +0200 Subject: [PATCH] Learn the ARP entry of the DHCP server directly from the DHCP response --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index f0630ae..a29be2c 100644 --- 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); -- 2.25.1