From e0a2eea070be28f8da56ebcb437bf11a96cc5c25 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Thu, 25 Apr 2019 11:29:06 -0500 Subject: [PATCH] add comment on openconnect__inet_aton(), which is not 100% compatible with "real" inet_aton() Signed-off-by: Daniel Lenski --- compat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compat.c b/compat.c index 777739a3..1246730b 100644 --- a/compat.c +++ b/compat.c @@ -185,6 +185,10 @@ char *openconnect__strndup(const char *s, size_t n) #endif #ifndef HAVE_INET_ATON +/* XX: unlike "real" inet_aton(), inet_pton() only accepts dotted-decimal notation, not + * looser/rarer formats like 32-bit decimal values. For example, inet_aton() accepts both + * "127.0.0.1" and "2130706433" as equivalent, but inet_pton() only accepts the former. + */ int openconnect__inet_aton(const char *cp, struct in_addr *addr) { return inet_pton(AF_INET, cp, addr); -- 2.49.0