From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 0474D3858D32 for ; Sat, 14 May 2022 22:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0474D3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x07.wildebeest.org [172.31.17.137]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 06897302BBEC for ; Sun, 15 May 2022 00:15:17 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id AD3432E813D6; Sun, 15 May 2022 00:15:01 +0200 (CEST) Date: Sun, 15 May 2022 00:15:01 +0200 From: Mark Wielaard To: elfutils-devel@sourceware.org Subject: Re: [PATCH] debuginfod: Always request servname from getnameinfo for conninfo. Message-ID: References: <20220509211044.54967-1-mark@klomp.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509211044.54967-1-mark@klomp.org> X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2022 22:15:22 -0000 Hi, On Mon, May 09, 2022 at 11:10:44PM +0200, Mark Wielaard wrote: > When getting the connection info getnameinfo is called getting the > hostname and servname except when the sockaddr is a pure ipv6 > address. In that last case only hostname is requested. Since servname > is stack allocated and not initialized it might contain garbage which > is then put in the log. Just always request both hostname and servname > with NI_NUMERICHOST | NI_NUMERICSERV. Pushed. Cheers, Mark