diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-17 13:24:03 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-17 13:24:03 +0200 |
commit | 6947d2c7e194e3be31eed1c75260e15fca1a2568 (patch) | |
tree | ff4d67b49e0e7e02e29ecc090db619a39b24498d /networking/udhcp/arpping.c | |
parent | 2b0e95780863da44f6a9244699ece8620a599e19 (diff) | |
download | busybox-w32-6947d2c7e194e3be31eed1c75260e15fca1a2568.tar.gz busybox-w32-6947d2c7e194e3be31eed1c75260e15fca1a2568.tar.bz2 busybox-w32-6947d2c7e194e3be31eed1c75260e15fca1a2568.zip |
udhcp: logging improvements, field and variable renames
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/arpping.c')
-rw-r--r-- | networking/udhcp/arpping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index 47a7b1351..89400e296 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c | |||
@@ -41,7 +41,7 @@ enum { | |||
41 | 41 | ||
42 | /* Returns 1 if no reply received */ | 42 | /* Returns 1 if no reply received */ |
43 | 43 | ||
44 | int FAST_FUNC arpping(uint32_t test_ip, | 44 | int FAST_FUNC arpping(uint32_t test_nip, |
45 | const uint8_t *safe_mac, | 45 | const uint8_t *safe_mac, |
46 | uint32_t from_ip, | 46 | uint32_t from_ip, |
47 | uint8_t *from_mac, | 47 | uint8_t *from_mac, |
@@ -78,7 +78,7 @@ int FAST_FUNC arpping(uint32_t test_ip, | |||
78 | memcpy(arp.sHaddr, from_mac, 6); /* source hardware address */ | 78 | memcpy(arp.sHaddr, from_mac, 6); /* source hardware address */ |
79 | memcpy(arp.sInaddr, &from_ip, sizeof(from_ip)); /* source IP address */ | 79 | memcpy(arp.sInaddr, &from_ip, sizeof(from_ip)); /* source IP address */ |
80 | /* tHaddr is zero-filled */ /* target hardware address */ | 80 | /* tHaddr is zero-filled */ /* target hardware address */ |
81 | memcpy(arp.tInaddr, &test_ip, sizeof(test_ip)); /* target IP address */ | 81 | memcpy(arp.tInaddr, &test_nip, sizeof(test_nip));/* target IP address */ |
82 | 82 | ||
83 | memset(&addr, 0, sizeof(addr)); | 83 | memset(&addr, 0, sizeof(addr)); |
84 | safe_strncpy(addr.sa_data, interface, sizeof(addr.sa_data)); | 84 | safe_strncpy(addr.sa_data, interface, sizeof(addr.sa_data)); |
@@ -111,7 +111,7 @@ int FAST_FUNC arpping(uint32_t test_ip, | |||
111 | && arp.operation == htons(ARPOP_REPLY) | 111 | && arp.operation == htons(ARPOP_REPLY) |
112 | /* don't check it: Linux doesn't return proper tHaddr (fixed in 2.6.24?) */ | 112 | /* don't check it: Linux doesn't return proper tHaddr (fixed in 2.6.24?) */ |
113 | /* && memcmp(arp.tHaddr, from_mac, 6) == 0 */ | 113 | /* && memcmp(arp.tHaddr, from_mac, 6) == 0 */ |
114 | && *((uint32_t *) arp.sInaddr) == test_ip | 114 | && *((uint32_t *) arp.sInaddr) == test_nip |
115 | ) { | 115 | ) { |
116 | /* if ARP source MAC matches safe_mac | 116 | /* if ARP source MAC matches safe_mac |
117 | * (which is client's MAC), then it's not a conflict | 117 | * (which is client's MAC), then it's not a conflict |