summaryrefslogtreecommitdiff
path: root/networking/udhcp/script.c
diff options
context:
space:
mode:
authorRuss Dill2003-12-15 22:09:36 +0000
committerRuss Dill2003-12-15 22:09:36 +0000
commit4a9e34c14867430141c1e510847df0ec91060a5d (patch)
tree84fe7807595642f4469d98c0a2d7d4f691a52887 /networking/udhcp/script.c
parenta1fece2c70898a1180f0506df6695e3077510731 (diff)
downloadbusybox-4a9e34c14867430141c1e510847df0ec91060a5d.zip
busybox-4a9e34c14867430141c1e510847df0ec91060a5d.tar.gz
options is a pretty common symbol, bad idea to use as a global in udhcp when compiling into busybox
Diffstat (limited to 'networking/udhcp/script.c')
-rw-r--r--networking/udhcp/script.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index 41b680d..7876dd3 100644
--- a/networking/udhcp/script.c
+++ b/networking/udhcp/script.c
@@ -160,8 +160,8 @@ static char **fill_envp(struct dhcpMessage *packet)
if (packet == NULL)
num_options = 0;
else {
- for (i = 0; options[i].code; i++)
- if (get_option(packet, options[i].code))
+ for (i = 0; dhcp_options[i].code; i++)
+ if (get_option(packet, dhcp_options[i].code))
num_options++;
if (packet->siaddr) num_options++;
if ((temp = get_option(packet, DHCP_OPTION_OVER)))
@@ -184,14 +184,15 @@ static char **fill_envp(struct dhcpMessage *packet)
asprintip(&envp[j++], "ip=", (unsigned char *) &packet->yiaddr);
- for (i = 0; options[i].code; i++) {
- if (!(temp = get_option(packet, options[i].code)))
+ for (i = 0; dhcp_options[i].code; i++) {
+ if (!(temp = get_option(packet, dhcp_options[i].code)))
continue;
- envp[j] = xmalloc(upper_length(temp[OPT_LEN - 2], options[i].flags & TYPE_MASK) + strlen(options[i].name) + 2);
- fill_options(envp[j++], temp, &options[i]);
+ envp[j] = xmalloc(upper_length(temp[OPT_LEN - 2],
+ dhcp_options[i].flags & TYPE_MASK) + strlen(dhcp_options[i].name) + 2);
+ fill_options(envp[j++], temp, &dhcp_options[i]);
/* Fill in a subnet bits option for things like /24 */
- if (options[i].code == DHCP_SUBNET) {
+ if (dhcp_options[i].code == DHCP_SUBNET) {
memcpy(&subnet, temp, 4);
asprintf(&envp[j++], "mask=%d", mton(&subnet));
}