Wildcards in dhcp-range constructors

This commit is contained in:
Simon Kelley
2012-12-30 17:38:09 +00:00
parent dc9476b670
commit 771287be11
4 changed files with 17 additions and 6 deletions

View File

@@ -2291,6 +2291,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
new->flags |= CONTEXT_DHCP;
else if (strstr(a[leasepos], "constructor:") == a[leasepos])
{
if (a[leasepos][strlen(a[leasepos])-1] == '*')
{
a[leasepos][strlen(a[leasepos])-1] = 0;
new->flags |= CONTEXT_WILDCARD;
}
new->template_interface = opt_string_alloc(a[leasepos] + 12);
new->flags |= CONTEXT_TEMPLATE;
}