- A bug was fixed in the dhclient-script for BSDs to correctly carry error
codes through some conditions.
+- The parsing of some options in the dhclient lease file, in particular
+ the success DHCPv6 status-code, was fixed.
+
Changes since 4.0.0b2
- Clarified error message when lease limit exceeded
struct enumeration_value *find_enumeration_value (const char *name,
int length,
+ unsigned *widthp,
const char *value)
{
struct enumeration *e;
e = find_enumeration (name, length);
if (e) {
+ if (widthp != NULL)
+ *widthp = e->width;
for (i = 0; e -> values [i].name; i++) {
if (!strcmp (value, e -> values [i].name))
return &e -> values [i];
"identifier expected");
goto foo;
}
- e = find_enumeration_value (f, (*fmt) - f, val);
+ e = find_enumeration_value (f, (*fmt) - f, &len, val);
if (!e) {
parse_warn (cfile, "unknown value");
goto foo;
}
- if (!make_const_data (&t, &e -> value, 1, 0, 1, MDL))
+ if (!make_const_data (&t, &e -> value, len, 0, 1, MDL))
return 0;
break;
break;
case 't': /* Text string... */
+ token = peek_token (&val,
+ &len, cfile);
+ if (token == SEMI && fmt[1] == 'o') {
+ fmt++;
+ break;
+ }
token = next_token (&val,
&len, cfile);
if (token != STRING) {
break;
case 'N':
- f = fmt;
+ f = fmt + 1;
fmt = strchr (fmt, '.');
if (!fmt) {
parse_warn (cfile,
"identifier expected");
goto parse_exit;
}
- e = find_enumeration_value (f, fmt - f, val);
+ e = find_enumeration_value (f, fmt - f,
+ &len, val);
if (!e) {
parse_warn (cfile,
"unknown value");
goto parse_exit;
}
- len = 1;
dp = &e -> value;
goto alloc;
&dhcpv6_universe, 11, 1 },
#endif
{ "unicast", "6", &dhcpv6_universe, 12, 1 },
- { "status-code", "Nstatus-codes.t", &dhcpv6_universe, 13, 1 },
+ { "status-code", "Nstatus-codes.to", &dhcpv6_universe, 13, 1 },
{ "rapid-commit", "", &dhcpv6_universe, 14, 1 },
#if 0
/* XXX: user-class contents are of the form "StA" where the
void add_enumeration (struct enumeration *);
struct enumeration *find_enumeration (const char *, int);
struct enumeration_value *find_enumeration_value (const char *, int,
+ unsigned *,
const char *);
void skip_to_semi PROTO ((struct parse *));
void skip_to_rbrace PROTO ((struct parse *, int));