From: Daniel Lenski Date: Thu, 25 Apr 2019 16:29:06 +0000 (-0500) Subject: add comment on openconnect__inet_aton(), which is not 100% compatible with "real... X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e0a2eea070be28f8da56ebcb437bf11a96cc5c25;p=users%2Fdwmw2%2Fopenconnect.git add comment on openconnect__inet_aton(), which is not 100% compatible with "real" inet_aton() Signed-off-by: Daniel Lenski --- 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);