tests: getaddrinfo() should use 0 as ai_flags.
authorAndreas Schneider <asn@samba.org>
Thu, 22 May 2014 13:10:46 +0000 (15:10 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 28 May 2014 15:38:08 +0000 (17:38 +0200)
This fixes an issue for the test platform configuration with IPv4 only
addresses.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10597

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
tests/test_getaddrinfo.c

index ce06fd90fd90369ecf40890c15f006d9dd6c3a40..a7714b1caa4f48227fb3b1c166e358003bb6dc99 100644 (file)
@@ -155,7 +155,7 @@ static void test_nwrap_getaddrinfo_local(void **state)
        memset(&hints, 0, sizeof(struct addrinfo));
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_ADDRCONFIG;
+       hints.ai_flags = 0;
 
        rc = getaddrinfo("127.0.0.1", NULL, &hints, &res);
        assert_int_equal(rc, 0);
@@ -187,7 +187,7 @@ static void test_nwrap_getaddrinfo_name(void **state)
        memset(&hints, 0, sizeof(struct addrinfo));
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_ADDRCONFIG;
+       hints.ai_flags = 0;
 
        rc = getaddrinfo("maximegalon.galaxy.site", NULL, &hints, &res);
        assert_int_equal(rc, 0);
@@ -209,7 +209,7 @@ static void test_nwrap_getaddrinfo_name(void **state)
        memset(&hints, 0, sizeof(struct addrinfo));
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_ADDRCONFIG;
+       hints.ai_flags = 0;
 
        rc = getaddrinfo("MAGRATHEA", NULL, &hints, &res);
        assert_int_equal(rc, 0);
@@ -242,7 +242,7 @@ static void test_nwrap_getaddrinfo_service(void **state)
        memset(&hints, 0, sizeof(struct addrinfo));
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
-       hints.ai_flags = AI_ADDRCONFIG;
+       hints.ai_flags = 0;
 
        rc = getaddrinfo("magrathea", "wurst", &hints, &res);
        assert_int_equal(rc, EAI_SERVICE);
@@ -281,7 +281,7 @@ static void test_nwrap_getaddrinfo_null(void **state)
        hints.ai_family = AF_INET6;
        hints.ai_socktype = SOCK_DGRAM;
        hints.ai_protocol = 17;
-       hints.ai_flags = AI_ADDRCONFIG;
+       hints.ai_flags = 0;
 
        rc = getaddrinfo(NULL, NULL, &hints, &res);
        assert_int_equal(rc, EAI_NONAME);