diff options
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r-- | networking/udhcp/files.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 40cfe9fd2..62f4a388f 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -99,7 +99,7 @@ static void attach_option(struct option_set **opt_list, | |||
99 | log2("Attaching option %02x to list", option->code); | 99 | log2("Attaching option %02x to list", option->code); |
100 | 100 | ||
101 | #if ENABLE_FEATURE_UDHCP_RFC3397 | 101 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
102 | if ((option->flags & TYPE_MASK) == OPTION_STR1035) | 102 | if ((option->flags & OPTION_TYPE_MASK) == OPTION_STR1035) |
103 | /* reuse buffer and length for RFC1035-formatted string */ | 103 | /* reuse buffer and length for RFC1035-formatted string */ |
104 | buffer = (char *)dname_enc(NULL, 0, buffer, &length); | 104 | buffer = (char *)dname_enc(NULL, 0, buffer, &length); |
105 | #endif | 105 | #endif |
@@ -118,7 +118,7 @@ static void attach_option(struct option_set **opt_list, | |||
118 | new->next = *curr; | 118 | new->next = *curr; |
119 | *curr = new; | 119 | *curr = new; |
120 | #if ENABLE_FEATURE_UDHCP_RFC3397 | 120 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
121 | if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL) | 121 | if ((option->flags & OPTION_TYPE_MASK) == OPTION_STR1035 && buffer != NULL) |
122 | free(buffer); | 122 | free(buffer); |
123 | #endif | 123 | #endif |
124 | return; | 124 | return; |
@@ -128,7 +128,7 @@ static void attach_option(struct option_set **opt_list, | |||
128 | log1("Attaching option %02x to existing member of list", option->code); | 128 | log1("Attaching option %02x to existing member of list", option->code); |
129 | if (option->flags & OPTION_LIST) { | 129 | if (option->flags & OPTION_LIST) { |
130 | #if ENABLE_FEATURE_UDHCP_RFC3397 | 130 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
131 | if ((option->flags & TYPE_MASK) == OPTION_STR1035) | 131 | if ((option->flags & OPTION_TYPE_MASK) == OPTION_STR1035) |
132 | /* reuse buffer and length for RFC1035-formatted string */ | 132 | /* reuse buffer and length for RFC1035-formatted string */ |
133 | buffer = (char *)dname_enc(existing->data + 2, | 133 | buffer = (char *)dname_enc(existing->data + 2, |
134 | existing->data[OPT_LEN], buffer, &length); | 134 | existing->data[OPT_LEN], buffer, &length); |
@@ -136,7 +136,7 @@ static void attach_option(struct option_set **opt_list, | |||
136 | if (existing->data[OPT_LEN] + length <= 255) { | 136 | if (existing->data[OPT_LEN] + length <= 255) { |
137 | existing->data = xrealloc(existing->data, | 137 | existing->data = xrealloc(existing->data, |
138 | existing->data[OPT_LEN] + length + 3); | 138 | existing->data[OPT_LEN] + length + 3); |
139 | if ((option->flags & TYPE_MASK) == OPTION_STRING) { | 139 | if ((option->flags & OPTION_TYPE_MASK) == OPTION_STRING) { |
140 | /* ' ' can bring us to 256 - bad */ | 140 | /* ' ' can bring us to 256 - bad */ |
141 | if (existing->data[OPT_LEN] + length >= 255) | 141 | if (existing->data[OPT_LEN] + length >= 255) |
142 | return; | 142 | return; |
@@ -148,7 +148,7 @@ static void attach_option(struct option_set **opt_list, | |||
148 | existing->data[OPT_LEN] += length; | 148 | existing->data[OPT_LEN] += length; |
149 | } /* else, ignore the data, we could put this in a second option in the future */ | 149 | } /* else, ignore the data, we could put this in a second option in the future */ |
150 | #if ENABLE_FEATURE_UDHCP_RFC3397 | 150 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
151 | if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL) | 151 | if ((option->flags & OPTION_TYPE_MASK) == OPTION_STR1035 && buffer != NULL) |
152 | free(buffer); | 152 | free(buffer); |
153 | #endif | 153 | #endif |
154 | } /* else, ignore the new data */ | 154 | } /* else, ignore the new data */ |
@@ -182,10 +182,10 @@ static int FAST_FUNC read_opt(const char *const_line, void *arg) | |||
182 | do { | 182 | do { |
183 | val = strtok(NULL, ", \t"); | 183 | val = strtok(NULL, ", \t"); |
184 | if (!val) break; | 184 | if (!val) break; |
185 | length = dhcp_option_lengths[option->flags & TYPE_MASK]; | 185 | length = dhcp_option_lengths[option->flags & OPTION_TYPE_MASK]; |
186 | retval = 0; | 186 | retval = 0; |
187 | opt = buffer; /* new meaning for variable opt */ | 187 | opt = buffer; /* new meaning for variable opt */ |
188 | switch (option->flags & TYPE_MASK) { | 188 | switch (option->flags & OPTION_TYPE_MASK) { |
189 | case OPTION_IP: | 189 | case OPTION_IP: |
190 | retval = read_nip(val, buffer); | 190 | retval = read_nip(val, buffer); |
191 | break; | 191 | break; |