MINOR: pattern: fix pat_{parse,match}_ip() function comments

Function comments were outdated, probably because they have not been
updated during the previous refactors.

Fixing comments to better reflect the current behavior.

This may be backported up to 2.2, or even 2.0 by slightly adapting the
patch (in 2.0, such functions are documented in proto/pattern.h)

(cherry picked from commit acb7d8a89cb16836b5764607a13fd1759427ae7e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c8eb1d1789f81b10fedef7e139c7d01d1b04adad)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c6b25b1be1c0c49d17996cb4f72baa3c9fc934b9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0aadfb5b9ba01aabbd691edc36d1781d89120642)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/include/haproxy/pattern.h b/include/haproxy/pattern.h
index 81ef5df..43c0acb 100644
--- a/include/haproxy/pattern.h
+++ b/include/haproxy/pattern.h
@@ -122,9 +122,10 @@
 int pat_parse_reg(const char *text, struct pattern *pattern, int mflags, char **err);
 
 /* Parse an IP address and an optional mask in the form addr[/mask].
- * The addr may either be an IPv4 address or a hostname. The mask
- * may either be a dotted mask or a number of bits. Returns 1 if OK,
- * otherwise 0.
+ * The addr may either be an IPv4 or IPv6 address, or a hostname that resolves
+ * to a valid IPv4 address. The mask can be provided as a number of bits, or
+ * even as a dotted mask (but the latter only works for IPv4 addresses).
+ * Returns 1 if OK, otherwise 0.
  */
 int pat_parse_ip(const char *text, struct pattern *pattern, int mflags, char **err);
 
@@ -164,7 +165,9 @@
  */
 struct pattern *pat_match_dom(struct sample *smp, struct pattern_expr *expr, int fill);
 
-/* Check that the IPv4 address in <test> matches the IP/mask in pattern */
+/* Check that the input IP address (IPv4 or IPv6) in <smp> matches the IP/mask
+ * in pattern
+ */
 struct pattern *pat_match_ip(struct sample *smp, struct pattern_expr *expr, int fill);
 
 /* Executes a regex. It temporarily changes the data to add a trailing zero,