From: Ken Brown <kbrown@cornell.edu>
To: cygwin-patches <cygwin-patches@cygwin.com>
Subject: [PATCH 1/2] Cygwin: getifaddrs: fix address family for IPv6 netmasks
Date: Mon, 26 Jul 2021 17:04:10 -0400 [thread overview]
Message-ID: <63cb52fd-9014-03e4-87f0-83831574e94a@cornell.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 16 bytes --]
Patch attached.
[-- Attachment #2: 0001-Cygwin-getifaddrs-fix-address-family-for-IPv6-netmas.patch --]
[-- Type: text/plain, Size: 930 bytes --]
From 49ff12b47d9d71960fd7b39846b302b8031affa4 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 26 Jul 2021 08:59:09 -0400
Subject: [PATCH 1/2] Cygwin: getifaddrs: fix address family for IPv6 netmasks
The code in net.cc:get_ifs that sets the netmask omitted setting the
address family in the IPv6 case. Fix this by setting it to AF_INET6.
Partially addresses: https://cygwin.com/pipermail/cygwin/2021-July/248970.html
---
winsup/cygwin/net.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index cec0a70cc..67dd7fc04 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -1869,6 +1869,7 @@ get_ifs (ULONG family)
if (prefix < 32)
if_sin6->sin6_addr.s6_addr32[cnt] <<= 32 - prefix;
}
+ if_sin6->sin6_family = AF_INET6;
break;
}
ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
--
2.32.0
reply other threads:[~2021-07-26 21:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63cb52fd-9014-03e4-87f0-83831574e94a@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).