public inbox for
 help / color / mirror / Atom feed
From: (Florian Weimer)
Subject: [2.27 COMMITTED] Add an additional test to resolv/tst-resolv-network.c
Date: Mon, 01 Jan 2018 00:00:00 -0000	[thread overview]
Message-ID: <> (raw)

From: Alexandra Hájková <>

Test for the infinite loop in getnetbyname, bug #17630.

(cherry picked from commit ac8060265bcaca61568ef3a20b9a0140a270af54)

2018-11-08  Alexandra Hájková  <>

	[BZ #17630]
	* resolv/tst-resolv-network.c: Add test for getnetbyname.

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));
+    case 104:
+      send_ptr (b, qname, qclass, qtype, "host.example");
+      break;
       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,

                 reply	other threads:[~2018-11-09 13:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).