summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorAlexandra Hájková <ahajkova@redhat.com>2018-10-19 13:30:44 +0200
committerAlexandra Hájková <ahajkova@redhat.com>2018-11-08 13:47:34 +0100
commitac8060265bcaca61568ef3a20b9a0140a270af54 (patch)
tree0c600548a647cbcc3f0a82757bc1dd6ba81fb70e /resolv
parent596cc360aa9f0484d6621fd9dfa5de83c3a24dc5 (diff)
downloadglibc-ac8060265bcaca61568ef3a20b9a0140a270af54.tar.gz
Add an additional test to resolv/tst-resolv-network.c
Test for the infinite loop in getnetbyname, bug #17630.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/tst-resolv-network.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/resolv/tst-resolv-network.c b/resolv/tst-resolv-network.c
index 4b862d57e6..735e38d0f8 100644
--- a/resolv/tst-resolv-network.c
+++ b/resolv/tst-resolv-network.c
@@ -149,6 +149,9 @@ handle_code (const struct resolv_response_context *ctx,
resolv_response_add_data (b, &rrtype, sizeof (rrtype));
}
break;
+ case 104:
+ send_ptr (b, qname, qclass, qtype, "host.example");
+ break;
default:
FAIL_EXIT1 ("invalid QNAME: %s (code %d)", qname, code);
}
@@ -257,6 +260,9 @@ do_test (void)
"error: TRY_AGAIN\n");
check_netent ("code103.example", getnetbyname ("code103.example"),
"error: NO_RECOVERY\n");
+ /* Test bug #17630. */
+ check_netent ("code104.example", getnetbyname ("code104.example"),
+ "error: TRY_AGAIN\n");
/* Lookup by address, success cases. */
check_reverse (1,