From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by sourceware.org (Postfix) with ESMTPS id 7EC43385BF92 for ; Thu, 18 Nov 2021 19:28:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7EC43385BF92 Received: by mail-ua1-x936.google.com with SMTP id r15so16175552uao.3 for ; Thu, 18 Nov 2021 11:28:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=cciRpVeEmiiHWLfpsiTqmHUiVBg+x8RDwQxNVz4ybLE=; b=PYsoaohIgM7RvJarrvuFyB30iO6vGSOBiXOo+sqt9fG5r96XD0EAhozzxDTzNR5jGd WAZ32COVkk6Gm1/lkUutOh0DUyThtmcLls/S6eQnNmV8i5IZwtezhSE/nA2Cef99buQ8 9MfjkC2e0oM/QbQG8tqKtIu+/OvSmdV5gf2ojky16KkQU7bgccTWy8Jjlbfrs7O2AorT Y8ranzyHm1pAeqefEBeWErtzFJk/VBLTJ8l0CJf/Hc0cc0neW6onck1cgRMwBtWlfDvi Nxd2z717fqPTihM4MBJGpmZlfWnQI3K9xn/MVD4e0xQA0dJXc68Edw3WGCd8Ktnt0qJy kNRw== X-Gm-Message-State: AOAM533VMmIcXUmmGFh/oUEygvKIot+FSxTsWl6/EkCBoizvY0fTO3Ai 5EAFoLFwWC/gCAEllBv1lyPchHW1ZeDgKw== X-Google-Smtp-Source: ABdhPJw6Uw7gWWwJSgKY6eAg0wwW1Y+4wYVy/Ce2zLa3KBX9H/MVVCDF2a+raLJeXYAirt/iNGZIqQ== X-Received: by 2002:ab0:7095:: with SMTP id m21mr40007592ual.82.1637263691943; Thu, 18 Nov 2021 11:28:11 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:66dc:202f:4b8d:b771:d283? ([2804:431:c7ca:66dc:202f:4b8d:b771:d283]) by smtp.gmail.com with ESMTPSA id d16sm398660vko.29.2021.11.18.11.28.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Nov 2021 11:28:11 -0800 (PST) Message-ID: Date: Thu, 18 Nov 2021 16:28:09 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH v2] socket: Do not use AF_NETLINK in __opensock Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <87v90q4vh3.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: <87v90q4vh3.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 18 Nov 2021 19:28:14 -0000 On 17/11/2021 13:07, Florian Weimer wrote: > It is not possible to use interface ioctls with netlink sockets > in all Linux kernels. LGTM, thanks. Reviewed-by: Adhemerval Zanella > > --- > v2: Comment updated. > socket/opensock.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/socket/opensock.c b/socket/opensock.c > index ff94d27a61..3e35821f91 100644 > --- a/socket/opensock.c > +++ b/socket/opensock.c > @@ -24,17 +24,10 @@ > int > __opensock (void) > { > - /* SOCK_DGRAM is supported by all address families. (Netlink does > - not support SOCK_STREAM.) */ > + /* SOCK_DGRAM is supported by all address families. */ > int type = SOCK_DGRAM | SOCK_CLOEXEC; > int fd; > > -#ifdef AF_NETLINK > - fd = __socket (AF_NETLINK, type, 0); > - if (fd >= 0) > - return fd; > -#endif > - > fd = __socket (AF_UNIX, type, 0); > if (fd >= 0) > return fd; >