diff options
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r-- | networking/udhcp/files.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index b7bad3309..0b97d76a5 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -90,7 +90,7 @@ static void attach_option(struct option_set **opt_list, | |||
90 | if (!existing) { | 90 | if (!existing) { |
91 | DEBUG("Attaching option %02x to list", option->code); | 91 | DEBUG("Attaching option %02x to list", option->code); |
92 | 92 | ||
93 | #if ENABLE_FEATURE_RFC3397 | 93 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
94 | if ((option->flags & TYPE_MASK) == OPTION_STR1035) | 94 | if ((option->flags & TYPE_MASK) == OPTION_STR1035) |
95 | /* reuse buffer and length for RFC1035-formatted string */ | 95 | /* reuse buffer and length for RFC1035-formatted string */ |
96 | buffer = (char *)dname_enc(NULL, 0, buffer, &length); | 96 | buffer = (char *)dname_enc(NULL, 0, buffer, &length); |
@@ -109,7 +109,7 @@ static void attach_option(struct option_set **opt_list, | |||
109 | 109 | ||
110 | new->next = *curr; | 110 | new->next = *curr; |
111 | *curr = new; | 111 | *curr = new; |
112 | #if ENABLE_FEATURE_RFC3397 | 112 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
113 | if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL) | 113 | if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL) |
114 | free(buffer); | 114 | free(buffer); |
115 | #endif | 115 | #endif |
@@ -119,7 +119,7 @@ static void attach_option(struct option_set **opt_list, | |||
119 | /* add it to an existing option */ | 119 | /* add it to an existing option */ |
120 | DEBUG("Attaching option %02x to existing member of list", option->code); | 120 | DEBUG("Attaching option %02x to existing member of list", option->code); |
121 | if (option->flags & OPTION_LIST) { | 121 | if (option->flags & OPTION_LIST) { |
122 | #if ENABLE_FEATURE_RFC3397 | 122 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
123 | if ((option->flags & TYPE_MASK) == OPTION_STR1035) | 123 | if ((option->flags & TYPE_MASK) == OPTION_STR1035) |
124 | /* reuse buffer and length for RFC1035-formatted string */ | 124 | /* reuse buffer and length for RFC1035-formatted string */ |
125 | buffer = (char *)dname_enc(existing->data + 2, | 125 | buffer = (char *)dname_enc(existing->data + 2, |
@@ -139,7 +139,7 @@ static void attach_option(struct option_set **opt_list, | |||
139 | memcpy(existing->data + existing->data[OPT_LEN] + 2, buffer, length); | 139 | memcpy(existing->data + existing->data[OPT_LEN] + 2, buffer, length); |
140 | existing->data[OPT_LEN] += length; | 140 | existing->data[OPT_LEN] += length; |
141 | } /* else, ignore the data, we could put this in a second option in the future */ | 141 | } /* else, ignore the data, we could put this in a second option in the future */ |
142 | #if ENABLE_FEATURE_RFC3397 | 142 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
143 | if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL) | 143 | if ((option->flags & TYPE_MASK) == OPTION_STR1035 && buffer != NULL) |
144 | free(buffer); | 144 | free(buffer); |
145 | #endif | 145 | #endif |
@@ -190,7 +190,7 @@ static int read_opt(const char *const_line, void *arg) | |||
190 | retval = read_ip(val, buffer + 4); | 190 | retval = read_ip(val, buffer + 4); |
191 | break; | 191 | break; |
192 | case OPTION_STRING: | 192 | case OPTION_STRING: |
193 | #if ENABLE_FEATURE_RFC3397 | 193 | #if ENABLE_FEATURE_UDHCP_RFC3397 |
194 | case OPTION_STR1035: | 194 | case OPTION_STR1035: |
195 | #endif | 195 | #endif |
196 | length = strlen(val); | 196 | length = strlen(val); |
@@ -266,7 +266,7 @@ static int read_staticlease(const char *const_line, void *arg) | |||
266 | 266 | ||
267 | addStaticLease(arg, mac_bytes, ip); | 267 | addStaticLease(arg, mac_bytes, ip); |
268 | 268 | ||
269 | if (ENABLE_FEATURE_UDHCP_DEBUG) printStaticLeases(arg); | 269 | if (ENABLE_UDHCP_DEBUG) printStaticLeases(arg); |
270 | 270 | ||
271 | return 1; | 271 | return 1; |
272 | } | 272 | } |