Introduction
Introduction Statistics Contact Development Disclaimer Help
Allow dualstack binding again. - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 24a79c11d203eef18e389d5828393727629205a8
parent 61d8eaf684d3c7751e63e04ad37411b53af101ac
Author: Christoph Lohmann <[email protected]>
Date: Sun, 11 Nov 2018 11:09:55 +0100
Allow dualstack binding again.
Diffstat:
M main.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/main.c b/main.c
@@ -301,9 +301,7 @@ getlistenfd(struct addrinfo *hints, char *bindip, char *por…
char addstr[INET6_ADDRSTRLEN];
struct addrinfo *ai, *rp;
void *sinaddr;
- int on, reqaf, listfd, aierr, errno_save;
-
- reqaf = hints->ai_family;
+ int on, listfd, aierr, errno_save;
if ((aierr = getaddrinfo(bindip, port, hints, &ai)) || ai == NULL) {
fprintf(stderr, "getaddrinfo (%s:%s): %s\n", bindip, port,
@@ -325,14 +323,6 @@ getlistenfd(struct addrinfo *hints, char *bindip, char *po…
break;
}
- if (reqaf == AF_INET6 &&
- (setsockopt(listfd, IPPROTO_IPV6, IPV6_V6ONLY, &on,
- sizeof(on)) < 0)) {
- close(listfd);
- listfd = -1;
- break;
- }
-
sinaddr = (rp->ai_family == AF_INET) ?
(void *)&((struct sockaddr_in *)rp->ai_addr)->sin_ad…
(void *)&((struct sockaddr_in6 *)rp->ai_addr)->sin6_…
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.