diff --git a/src/stick_table.c b/src/stick_table.c index d42cd8f6a..905310fc6 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -4903,7 +4903,8 @@ static int table_process_entry_per_key(struct appctx *appctx, char **args) switch (t->type) { case SMP_T_IPV4: - uint32_key = htonl(inetaddr_host(args[4])); + if (inet_pton(AF_INET, args[4], &uint32_key) <= 0) + return cli_err(appctx, "Invalid key\n"); static_table_key.key = &uint32_key; break; case SMP_T_IPV6: