nwrap: add an explaining comment for the ai duplicating loop
authorMichael Adam <obnox@samba.org>
Thu, 12 Nov 2015 10:17:21 +0000 (11:17 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:31 +0000 (12:25 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/nss_wrapper/nss_wrapper.c

index a97d19812f59a955a4abf545883d44640837d14b..dabced100a3515ba6f9938159c7ada45e922bcef 100644 (file)
@@ -5255,6 +5255,11 @@ valid_port:
                return rc;
        }
 
+       /*
+        * If the socktype was not specified, duplicate
+        * each ai returned, so that we have variants for
+        * both UDP and TCP.
+        */
        if (hints->ai_socktype == 0) {
                /* Add second ai */
                struct addrinfo *ai_head = ai;