DHCPv6 vendor class option includes an enterprise number. Handle that.

This commit is contained in:
Simon Kelley
2012-02-10 13:42:47 +00:00
parent ceae00dddf
commit a5c72ab51d
4 changed files with 51 additions and 13 deletions

View File

@@ -2870,6 +2870,18 @@ static char *one_opt(int option, char *arg, char *gen_prob, int command_line)
new->netid.net = opt_string_alloc(set_prefix(arg));
/* check for hex string - must digits may include : must not have nothing else,
only allowed for agent-options. */
arg = comma;
if ((comma = split(arg)))
{
if (option != 'U' || strstr(arg, "enterprise:") != arg)
option = '?';
else
new->enterprise = atoi(arg+11);
}
else
comma = arg;
for (p = (unsigned char *)comma; *p; p++)
if (isxdigit(*p))
dig = 1;