BUG/MINOR: stick-table/cli: Check for invalid ipv4 key

When an ipv4 key is used to filter a CLI command on a stick table
clear/set/show table ...), inetaddr_host+htonl combination was used
with no error checking.

Instead, we now use inet_pton(), which is what we use for ipv6 addresses
since b7c962b0c0 ("BUG/MINOR: stick-table/cli: Check for invalid ipv6 key")

Doing this allows us to easily check for parsing errors: we're trading off
some parsing efficience to better catch input errors and ensure we get
similar behavior between ipv4 and ipv6 addresses handling.

This patch may be backported to all supported versions.

(cherry picked from commit c6826b957053e47932ed0560a9a562d707f7dedf)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit deb4e5e9850cc7b5d4d73eb8b08b7126eba2289d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit a847820aa993e3c4c0fe737ed47bedf405380518)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 8f14c763df5b8408d3451af29b79b2cac8723107)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed