mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
MINOR: config: Add support for ARGT_MSK6
This commit adds support for ARGT_MSK6 to make_arg_list().
This commit is contained in:
parent
471851713a
commit
b814da6c5c
11
src/arg.c
11
src/arg.c
@ -206,8 +206,15 @@ int make_arg_list(const char *in, int len, uint64_t mask, struct arg **argp,
|
||||
goto parse_err;
|
||||
break;
|
||||
|
||||
case ARGT_MSK6: /* not yet implemented */
|
||||
goto not_impl;
|
||||
case ARGT_MSK6:
|
||||
if (in == beg) // empty mask
|
||||
goto empty_err;
|
||||
|
||||
if (!str2mask6(word, &arg->data.ipv6))
|
||||
goto parse_err;
|
||||
|
||||
arg->type = ARGT_IPV6;
|
||||
break;
|
||||
|
||||
case ARGT_TIME:
|
||||
if (in == beg) // empty time
|
||||
|
@ -704,6 +704,13 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
|
||||
break;
|
||||
|
||||
case ARGT_MSK6:
|
||||
memcpy(trash.str, argp[idx].data.str.str, argp[idx].data.str.len);
|
||||
trash.str[argp[idx].data.str.len] = 0;
|
||||
if (!str2mask6(trash.str, &argp[idx].data.ipv6))
|
||||
WILL_LJMP(luaL_argerror(L, first + idx, "invalid IPv6 mask"));
|
||||
argp[idx].type = ARGT_MSK6;
|
||||
break;
|
||||
|
||||
case ARGT_MAP:
|
||||
case ARGT_REG:
|
||||
case ARGT_USR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user