From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 71D9E1F8C6 for ; Thu, 15 Jul 2021 05:13:45 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFF2039DC4C7 for ; Thu, 15 Jul 2021 05:13:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFF2039DC4C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626326024; bh=WaIX/E1L2hEMHjxEj+O4Vl4Mm07Zt13PV9OrATgI7Rg=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ifOAgLvPcuw4ttd1s6lq+Io8Y44ky2O8mBs7iQlzRGpmsgqDfX9RB5glBERJIQBux B2SBPQzydZ9LYDSBzEAFXgAviXFf0hhL8XFU4I1Nfcr6xNRc9HYG4LO20GJK14GlNq RimewY7nJzks2HAu13bp0nJqYYYY99kX1jBfhKVk= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id D750139A28D2 for ; Thu, 15 Jul 2021 05:01:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D750139A28D2 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-233-C8TnlVa8N_6zXyTjXs-Exg-1; Thu, 15 Jul 2021 01:01:33 -0400 X-MC-Unique: C8TnlVa8N_6zXyTjXs-Exg-1 Received: by mail-qk1-f197.google.com with SMTP id t144-20020a3746960000b02903ad9c5e94baso2871282qka.16 for ; Wed, 14 Jul 2021 22:01:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=WaIX/E1L2hEMHjxEj+O4Vl4Mm07Zt13PV9OrATgI7Rg=; b=n6DWpqBi9h6aV7eq2Q+IemKJHCHJ9uzTwx7LSBToCBgvJrjeMTY5YaR0cyLeIwZg9o fF/easLV5E85Iff5SpmxbyyCFnwhqYIEXwcHfZjugjxyoGZSQcKenVwbMHFXcqmz58s9 r8CnD36TXWo/htG3ZEKRBW+0VGZymPXVuvIzgVvxYt812eo7rpW7W6SlHlATwLV+FZqJ BpJEXHuw6nPpITu4OxcEbrf1ONwvcIIOTuQGdZnm/3jyPLRbE/HepmRxc1xSapY8Yoln dnL2ENBiLnRR4j/Ir7bvWpOVtDv9AnE+x4DJXriGX9PlWx4ktN8zihDqvcZOVn1BoieR z0bw== X-Gm-Message-State: AOAM5325VChknj7PRjXtRUG03FKNl6p/ME6cb+M4xXC1+3MAdy3zff5K uJvcH8fKtG+2nCJoibAA01m1657ij0w/Z+ZAucd4Mw2r/2i5rU3pbajC3cXdPhzJZnwCEofFuL3 BJE0EVmXntpE3G4SOxvB3OpNtdWwx+DK6JXWqCn2VKeaWq4lG2XzIvyHH65lHLLS3QqU3QA== X-Received: by 2002:a0c:ff48:: with SMTP id y8mr2083040qvt.29.1626325292645; Wed, 14 Jul 2021 22:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygCmkk0EBYK5d44nv1FOdwmdz237U7mU3xvXEYftGRgoqd0Mtc+JvMrodVfJvEzByVKzMe4Q== X-Received: by 2002:a0c:ff48:: with SMTP id y8mr2083022qvt.29.1626325292504; Wed, 14 Jul 2021 22:01:32 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id i21sm884408qtw.68.2021.07.14.22.01.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 22:01:32 -0700 (PDT) Subject: Re: [PATCH 17/30] resolv: Remove unnecessary res_isourserver_p call from send_dg To: Florian Weimer , libc-alpha@sourceware.org References: <0166a598b85d22bb17ae3cda350cf93795f0f8fe.1625755446.git.fweimer@redhat.com> Organization: Red Hat Message-ID: <3bee1cb2-88bd-ae0f-7afc-294912374287@redhat.com> Date: Thu, 15 Jul 2021 01:01:31 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <0166a598b85d22bb17ae3cda350cf93795f0f8fe.1625755446.git.fweimer@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 7/8/21 11:04 AM, Florian Weimer via Libc-alpha wrote: > As the comment indicates, the check is unnecessary due to the way the > UDP socket is set up. OK for glibc 2.34. Tested without regression on x86_64 and i686. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell > --- > resolv/res_send.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/resolv/res_send.c b/resolv/res_send.c > index 77d6835e1a..b6139c7d62 100644 > --- a/resolv/res_send.c > +++ b/resolv/res_send.c > @@ -1343,12 +1343,6 @@ send_dg(res_state statp, > return close_and_return_error (statp, resplen2); > } > > - /* Paranoia check. Due to the connected UDP socket, > - the kernel has already filtered invalid addresses > - for us. */ > - if (!res_ourserver_p(statp, &from)) > - goto wait; OK. > - > /* Check for the correct header layout and a matching > question. */ > int matching_query = 0; /* Default to no matching query. */ > -- Cheers, Carlos.