Merged in antmerlino/apps/dhcpd-arp-fix (pull request #187)
netutils/dhcpd: Fixes bug where hwaddr was being used instead of ipaddr in the ARP update. This bug seems to have been introduced 3 years ago during a rewrite to remove a direct OS call to arp. I'm not sure how others have not run into issues with this. The behavior I was observing was that the DHCPD would go to offer an IP address, but then send a ARP request for the IP instead because it didn't know where to send the data. Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
ff8d6aeed0
commit
87098590b5
@ -296,7 +296,7 @@ static inline void dhcpd_arpupdate(FAR uint8_t *ipaddr, FAR uint8_t *hwaddr)
|
||||
|
||||
inaddr.sin_family = AF_INET;
|
||||
inaddr.sin_port = 0;
|
||||
memcpy(&inaddr.sin_addr.s_addr, hwaddr, sizeof(in_addr_t));
|
||||
memcpy(&inaddr.sin_addr.s_addr, ipaddr, sizeof(in_addr_t));
|
||||
|
||||
/* Update the ARP table */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user