Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196904/?format=api
{ "id": 2196904, "url": "http://patchwork.ozlabs.org/api/patches/2196904/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/f5171939645d26466dd08eac48f040108e2e6b09.1771249712.git.fweimer@redhat.com/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<f5171939645d26466dd08eac48f040108e2e6b09.1771249712.git.fweimer@redhat.com>", "list_archive_url": null, "date": "2026-02-16T13:49:40", "name": "[2/2] resolv: Avoid duplicate query if search list contains '.' (bug 33804)", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "17b62d556c304dbef001a622f69e210977bc43f7", "submitter": { "id": 14312, "url": "http://patchwork.ozlabs.org/api/people/14312/?format=api", "name": "Florian Weimer", "email": "fweimer@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/f5171939645d26466dd08eac48f040108e2e6b09.1771249712.git.fweimer@redhat.com/mbox/", "series": [ { "id": 492311, "url": "http://patchwork.ozlabs.org/api/series/492311/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=492311", "date": "2026-02-16T13:49:10", "name": "[1/2] support: no_override_resolv_conf_search flag for resolver test framework", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492311/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196904/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196904/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=gVpBqE6h;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=gVpBqE6h", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fF4140PzVz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 00:50:48 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0DE974BAD16B\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 13:50:46 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 0B15F4BAD16A\n for <libc-alpha@sourceware.org>; Mon, 16 Feb 2026 13:49:46 +0000 (GMT)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-251-eg0kTa1jM-O--ACUfaDhow-1; Mon,\n 16 Feb 2026 08:49:45 -0500", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 56BEE180025B; Mon, 16 Feb 2026 13:49:44 +0000 (UTC)", "from fweimer-oldenburg.csb.redhat.com (unknown [10.45.224.124])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 69B011955F43; Mon, 16 Feb 2026 13:49:43 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 0DE974BAD16B", "OpenDKIM Filter v2.11.0 sourceware.org 0B15F4BAD16A" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 0B15F4BAD16A", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 0B15F4BAD16A", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771249787; cv=none;\n b=YS3tujr3jXJlDu9Tz652aek3EcxYg3ZZFfmtix5UAGaGLot9+Mo2ooMyyzR619UOM63DxFUwaPPmTDCa9GZo0A1tiIdxPlNn9CaanE2dcAGagI46hBz3neYCRNYebCxRIgvH+BGPBYqWlybPZZOe9GkCAa3m1OXs63mrbyVTtMM=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771249787; c=relaxed/simple;\n bh=Lkw1bIArCtsVi5Hufc5iTmRjmTKBmd2ckdxLs8opWdY=;\n h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version;\n b=w4ePxP8Tml8yo7eXhcTRApgOvkwpBQwDz91eBSO2yHrMy2FsvNReMFb9t9yOdDbN6BeElo3ua61Wr1E/NpTgYFnS03N//JA5tzuf6kb6QeeeUkiU4vDov23wh83xcsglM/a7jtYwjd+A3LqeRvCBhzGGCW85Do1xOwLudabc15Y=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771249786;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=8plQLUe0963hJ+XSskcNDCL/lLjQ7c2qxYW9+PuEimQ=;\n b=gVpBqE6h4QX2wnw/DM1MxJ6UYRFA7TgkLvFoj3rVqV0Gb/OQjHIG94PaDIzv4Rkf6lKIeJ\n Lm+GubctZTpW5bsgJ2SZ8Q+vfGmD2SZHDNSlqex7z42ohjR5+OlSeYP3mbNq2pHNRGENqH\n BEXl8USfF1xsNoS1xFIUyEZYaIB/B88=", "X-MC-Unique": "eg0kTa1jM-O--ACUfaDhow-1", "X-Mimecast-MFC-AGG-ID": "eg0kTa1jM-O--ACUfaDhow_1771249784", "From": "Florian Weimer <fweimer@redhat.com>", "To": "libc-alpha@sourceware.org", "Cc": "Carlos =?utf-8?b?UGXDs24=?= Costa <carlospeon@gmail.com>", "Subject": "[PATCH 2/2] resolv: Avoid duplicate query if search list contains\n '.' (bug 33804)", "In-Reply-To": "\n <31732a6b137f5004d864da924d662b2098f10fc3.1771249712.git.fweimer@redhat.com>", "Message-ID": "\n <f5171939645d26466dd08eac48f040108e2e6b09.1771249712.git.fweimer@redhat.com>", "References": "\n <31732a6b137f5004d864da924d662b2098f10fc3.1771249712.git.fweimer@redhat.com>", "X-From-Line": "f5171939645d26466dd08eac48f040108e2e6b09 Mon Sep 17 00:00:00 2001", "Date": "Mon, 16 Feb 2026 14:49:40 +0100", "User-Agent": "Gnus/5.13 (Gnus v5.13)", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "iA7I-rFc-3qm7S9Cv16PF4QNZGiNuBVAeGpX3T6bwRQ_1771249784", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=UTF-8; charset=utf-8", "Content-Transfer-Encoding": "quoted-printable", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "From: Carlos Peón Costa <carlospeon@gmail.com>\n\nCo-authored-by: Florian Weimer <fweimer@redhat.com>\nSigned-off-by: Florian Weimer <fweimer@redhat.com>\n---\nTested on x864_64-linux-gnu.\n\n resolv/res_query.c | 11 +++++++----\n resolv/tst-resolv-no-search.c | 9 +++++++++\n 2 files changed, 16 insertions(+), 4 deletions(-)", "diff": "diff --git a/resolv/res_query.c b/resolv/res_query.c\nindex 039c25a3c3..30ace9d06d 100644\n--- a/resolv/res_query.c\n+++ b/resolv/res_query.c\n@@ -354,7 +354,7 @@ __res_context_search (struct resolv_context *ctx,\n \tchar tmp[NS_MAXDNAME];\n \tu_int dots;\n \tint trailing_dot, ret, saved_herrno;\n-\tint got_nodata = 0, got_servfail = 0, root_on_list = 0;\n+\tint got_nodata = 0, got_servfail = 0;\n \tint tried_as_is = 0;\n \tint searched = 0;\n \n@@ -433,8 +433,11 @@ __res_context_search (struct resolv_context *ctx,\n \t\t\t domain. */\n \t\t\tif (dname[0] == '.')\n \t\t\t\tdname++;\n-\t\t\tif (dname[0] == '\\0')\n-\t\t\t\troot_on_list++;\n+\t\t\tif (dname[0] == '\\0') {\n+\t\t\t\tif (tried_as_is)\n+\t\t\t\t\tcontinue;\n+\t\t\t\ttried_as_is++;\n+\t\t\t}\n \n \t\t\tret = __res_context_querydomain\n \t\t\t (ctx, name, dname, class, type,\n@@ -506,7 +509,7 @@ __res_context_search (struct resolv_context *ctx,\n \t * unless RES_NOTLDQUERY is set and there were no dots.\n \t */\n \tif ((dots || !searched || (statp->options & RES_NOTLDQUERY) == 0)\n-\t && !(tried_as_is || root_on_list)) {\n+\t && !tried_as_is) {\n \t\tret = __res_context_querydomain\n \t\t (ctx, name, NULL, class, type,\n \t\t answer, anslen, answerp, answerp2, nanswerp2,\ndiff --git a/resolv/tst-resolv-no-search.c b/resolv/tst-resolv-no-search.c\nindex 29701d4772..cde2812638 100644\n--- a/resolv/tst-resolv-no-search.c\n+++ b/resolv/tst-resolv-no-search.c\n@@ -27,6 +27,8 @@\n #include <support/resolv_test.h>\n #include <support/support.h>\n \n+static volatile int query_count;\n+\n /* Check that plain res_init loads the configuration as expected. */\n static void\n test_res_init (void *ignored)\n@@ -41,6 +43,7 @@ response (const struct resolv_response_context *ctx,\n struct resolv_response_builder *b,\n const char *qname, uint16_t qclass, uint16_t qtype)\n {\n+ ++query_count;\n TEST_VERIFY_EXIT (qclass == C_IN);\n TEST_COMPARE (ctx->server_index, 0);\n \n@@ -82,12 +85,16 @@ check_h (const char *name, int family, const char *expected)\n if (family == AF_INET)\n {\n char *query = xasprintf (\"gethostbyname (\\\"%s\\\")\", name);\n+ query_count = 0;\n check_hostent (query, gethostbyname (name), expected);\n+ TEST_COMPARE (query_count, 1);\n free (query);\n }\n {\n char *query = xasprintf (\"gethostbyname2 (\\\"%s\\\", %d)\", name, family);\n+ query_count = 0;\n check_hostent (query, gethostbyname2 (name, family), expected);\n+ TEST_COMPARE (query_count, 1);\n free (query);\n }\n }\n@@ -98,8 +105,10 @@ check_ai (const char *name, int family, const char *expected)\n struct addrinfo hints = { .ai_family = family, .ai_socktype = SOCK_STREAM, };\n struct addrinfo *ai;\n char *query = xasprintf (\"%s:80 [%d]\", name, hints.ai_family);\n+ query_count = 0;\n int ret = getaddrinfo (name, \"80\", &hints, &ai);\n check_addrinfo (query, ai, ret, expected);\n+ TEST_COMPARE (query_count, family == AF_UNSPEC ? 2 : 1);\n if (ret == 0)\n freeaddrinfo (ai);\n free (query);\n", "prefixes": [ "2/2" ] }