diff options
author | Alexandra Hájková <ahajkova@redhat.com> | 2018-10-19 13:30:44 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-11-09 14:43:45 +0100 |
commit | 27e46f5836d69c3e82442b1e3ac8a8b5e9ab12ce (patch) | |
tree | 97b3dc8e0d5cd3dc9eaedd4e25261ac08fac0014 | |
parent | fcd86c62538b465eaf002b0ed8981d00e10b649f (diff) | |
download | glibc-27e46f5836d69c3e82442b1e3ac8a8b5e9ab12ce.tar.gz glibc-27e46f5836d69c3e82442b1e3ac8a8b5e9ab12ce.tar.xz glibc-27e46f5836d69c3e82442b1e3ac8a8b5e9ab12ce.zip |
Add an additional test to resolv/tst-resolv-network.c
Test for the infinite loop in getnetbyname, bug #17630. (cherry picked from commit ac8060265bcaca61568ef3a20b9a0140a270af54)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | resolv/tst-resolv-network.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 390b91ca45..23724daa2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-11-08 Alexandra Hájková <ahajkova@redhat.com> + + [BZ #17630] + * resolv/tst-resolv-network.c: Add test for getnetbyname. + 2018-11-05 Andreas Schwab <schwab@suse.de> [BZ #22927] diff --git a/resolv/tst-resolv-network.c b/resolv/tst-resolv-network.c index df9daf8d58..65ce9634cc 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 @@ main (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, |