mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-11 06:43:42 -05:00
BUG/MINOR: stick-table/cli: Check for invalid ipv6 key
When an ipv6 key is used to filter a CLI command on a stick table (clear/set/show table ...), the return value of inet_pton() call must be checked to be sure the key is valid. This patch should fix the issue #1163. It should be backported to all supported versions.
This commit is contained in:
parent
d83f6e6224
commit
b7c962b0c0
1 changed files with 2 additions and 1 deletions
|
|
@ -4411,7 +4411,8 @@ static int table_process_entry_per_key(struct appctx *appctx, char **args)
|
|||
static_table_key.key = &uint32_key;
|
||||
break;
|
||||
case SMP_T_IPV6:
|
||||
inet_pton(AF_INET6, args[4], ip6_key);
|
||||
if (inet_pton(AF_INET6, args[4], ip6_key) <= 0)
|
||||
return cli_err(appctx, "Invalid key\n");
|
||||
static_table_key.key = &ip6_key;
|
||||
break;
|
||||
case SMP_T_SINT:
|
||||
|
|
|
|||
Loading…
Reference in a new issue