mirror of
https://git.busybox.net/udhcp
synced 2025-05-08 22:09:45 +08:00
use memcmp() not bcmp()
This commit is contained in:
parent
3da65ce484
commit
04edff8ba8
@ -90,7 +90,7 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface)
|
||||
} else if (FD_ISSET(s, &fdset)) {
|
||||
if (recv(s, &arp, sizeof(arp), 0) < 0 ) rv = 0;
|
||||
if (arp.operation == htons(ARPOP_REPLY) &&
|
||||
bcmp(arp.tHaddr, mac, 6) == 0 &&
|
||||
memcmp(arp.tHaddr, mac, 6) == 0 &&
|
||||
*((uint32_t *) arp.sInaddr) == yiaddr) {
|
||||
DEBUG(LOG_INFO, "Valid arp reply receved for this address");
|
||||
rv = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user