X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC6C8383B804 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1627340702; bh=52IktJKtpRL/qWkL/S+5b+Qm+z8EcKS84MqZxih4WcA=; h=In-Reply-To:Subject:To:Message-ID:From:References:Date:Reply-To; b=fec9YdJK1tJB0THp1yiD14gdlmvD/aJwC4ybSmwvSRSBryEgVImG8pvH81pnsRqYx gVa2w8jwsQZbr1I2cLjLFIJAncFlQqqePDpziz7GtP3GL5EN8DSCkjqK7DORkh9UcA yd4grPEHS1dMpxvQStLEGGN8uikYQ5ybUVaWpVMc= Authentication-Results: vla1-25221a47e1d2.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Date: Tue, 27 Jul 2021 02:04:08 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home X-Priority: 3 (Normal) Message-ID: <529122968.20210727020408@yandex.ru> To: Ken Brown , cygwin AT cygwin DOT com Subject: Re: Problems with getifaddrs In-Reply-To: <05d378e2-dd26-9ca1-2888-22015c4c63bd@cornell.edu> References: <05d378e2-dd26-9ca1-2888-22015c4c63bd AT cornell DOT edu> MIME-Version: 1.0 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Greetings, Ken Brown! > While investigating emacs test failures, I found two problems with the > interfaces returned by getifaddrs(3): > 1. For an IPv6 interface, the netmask address family is always 0 instead of > AF_INET6. > 2. For a disconnected interface, the IPv4 address and netmask are sometimes 0. For a disconnected interface this could be true as Configuration for interface "TAP12" DHCP enabled: Yes IP Address: 172.16.40.6 Subnet Prefix: 172.16.40.0/24 (mask 255.255.255.0) InterfaceMetric: 25 Configuration for interface "TAP55" DHCP enabled: Yes InterfaceMetric: 25 Configuration for interface "TAP63" DHCP enabled: No IP Address: 172.18.104.18 Subnet Prefix: 172.18.104.0/22 (mask 255.255.252.0) InterfaceMetric: 25 There's actually no IP address assigned to TAP55, which could be reported as 0/0. Can you please cross-check with netsh interface ipv4 show addr > I will be sending patches to fix these problems later today, but I wanted to > report them here for reference. > I don't know enough about this to be sure that problem 2 is really a Cygwin bug. > Are there cases where a 0 IP address is appropriate? Or should it be up to > the caller of getifaddrs to handle that case? -- With best regards, Andrey Repin Tuesday, July 27, 2021 1:57:57 Sorry for my terrible english... -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple