sync with udhcp bug fixes

This commit is contained in:
Russ Dill
2003-02-12 22:20:19 +00:00
parent 496411b489
commit 858fad722f
3 changed files with 9 additions and 6 deletions

View File

@@ -67,9 +67,9 @@ int arpping(u_int32_t yiaddr, u_int32_t ip, unsigned char *mac, char *interface)
arp.hlen = 6; /* hardware address length */
arp.plen = 4; /* protocol address length */
arp.operation = htons(ARPOP_REQUEST); /* ARP op code */
*((u_int *) arp.sInaddr) = ip; /* source IP address */
memcpy(arp.sInaddr, &ip, sizeof(ip)); /* source IP address */
memcpy(arp.sHaddr, mac, 6); /* source hardware address */
*((u_int *) arp.tInaddr) = yiaddr; /* target IP address */
memcpy(arp.tInaddr, &yiaddr, sizeof(yiaddr)); /* target IP address */
memset(&addr, 0, sizeof(addr));
strcpy(addr.sa_data, interface);