From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2959 invoked by alias); 18 Jun 2018 17:28:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 2947 invoked by uid 89); 18 Jun 2018 17:28:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*r:4.89, Hx-languages-length:755 X-HELO: albireo.enyo.de From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Linux: Implement opensock using Netlink sockets References: <20180618105015.5E8B340292859@oldenburg.str.redhat.com> <4e69cf5f-309f-007b-bc11-397e831566bd@linaro.org> <87a7rsuim7.fsf@mid.deneb.enyo.de> Date: Mon, 18 Jun 2018 17:28:00 -0000 In-Reply-To: (Adhemerval Zanella's message of "Mon, 18 Jun 2018 14:17:47 -0300") Message-ID: <87zhzst383.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-06/txt/msg00507.txt.bz2 * Adhemerval Zanella: >> The real question is whether it is important to avoid module loading. >> If we could just try >> >> AF_NETLINK >> AF_UNIX >> AF_INET >> AF_INET6 >> >> in this order, irrespective of the module load status, the code would >> already be much, much simpler. >> > > I think it should cover the expected kernel support (it would be unusual to > use the getifaddr functions with a kernel without tcpip support). > > The issues is we will need to ensure the returned socket works with > SIOCGIFNAME (maybe by issuing a ioctl to make it sure). Hmm, yes. For AF_NETLINK, such a check would definitely be needed. I'll have to check if this leads to the desired simplification.