summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-16 12:04:23 +0200
committerDenys Vlasenko2009-06-16 12:04:23 +0200
commit26918dd28ef6f2c6380ed23b384ddc8e98a8ad81 (patch)
tree77c5bd48717b9dbfd683937e3f70fc902b7c7119 /networking/udhcp/dhcpc.c
parentcab3a0127c3e6b7fc4f794ba6abcb8e01492118e (diff)
downloadbusybox-26918dd28ef6f2c6380ed23b384ddc8e98a8ad81.zip
busybox-26918dd28ef6f2c6380ed23b384ddc8e98a8ad81.tar.gz
udhcp: rename server/client_config.arp to server_mac and client_mac
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index ab34b04..44ff197 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -273,9 +273,14 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
client_config.opt_mask[n >> 3] |= 1 << (n & 7);
}
- if (udhcp_read_interface(client_config.interface, &client_config.ifindex,
- NULL, client_config.arp))
+ if (udhcp_read_interface(client_config.interface,
+ &client_config.ifindex,
+ NULL,
+ client_config.client_mac)
+ ) {
return 1;
+ }
+
#if !BB_MMU
/* on NOMMU reexec (i.e., background) early */
if (!(opt & OPT_f)) {
@@ -303,7 +308,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
if (!client_config.clientid && !(opt & OPT_C)) {
client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, "", 7);
client_config.clientid[OPT_DATA] = 1;
- memcpy(client_config.clientid + OPT_DATA+1, client_config.arp, 6);
+ memcpy(client_config.clientid + OPT_DATA+1, client_config.client_mac, 6);
}
if (!client_config.vendorclass)
@@ -490,7 +495,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
}
/* Ignore packets that aren't for us */
- if (memcmp(packet.chaddr, client_config.arp, 6)) {
+ if (memcmp(packet.chaddr, client_config.client_mac, 6)) {
DEBUG("Packet does not have our chaddr - ignoring");
continue;
}
@@ -555,7 +560,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
if (!arpping(packet.yiaddr,
NULL,
(uint32_t) 0,
- client_config.arp,
+ client_config.client_mac,
client_config.interface)
) {
bb_info_msg("offered address is in use "