MINOR: config: Add support for ARGT_MSK6
This commit adds support for ARGT_MSK6 to make_arg_list().
diff --git a/src/arg.c b/src/arg.c
index 52977b7..b31858d 100644
--- a/src/arg.c
+++ b/src/arg.c
@@ -206,8 +206,15 @@
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
diff --git a/src/hlua.c b/src/hlua.c
index fa629ba..ebe8c92 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -704,6 +704,13 @@
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: