We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7809a0f commit d043333Copy full SHA for d043333
src/utility/uip_arp.c
@@ -170,8 +170,7 @@ uip_arp_update(u16_t *ipaddr, struct uip_eth_addr *ethaddr)
170
171
/* Check if the source IP address of the incoming packet matches
172
the IP address in this ARP table entry. */
173
- if(ipaddr[0] == tabptr->ipaddr[0] &&
174
- ipaddr[1] == tabptr->ipaddr[1]) {
+ if(memcmp(ipaddr, tabptr->ipaddr, 4) == 0) {
175
176
/* An old entry found, update this and return. */
177
memcpy(tabptr->ethaddr.addr, ethaddr->addr, 6);
0 commit comments