FreeBSD Bugzilla – Attachment 169678 Details for
Bug 208928
net/csync2 binds only to ipv6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-csync2.c
patch-csync2.c (text/plain), 772 bytes, created by
Tijl Coosemans
on 2016-04-25 14:36:28 UTC
(
hide
)
Description:
patch-csync2.c
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2016-04-25 14:36:28 UTC
Size:
772 bytes
patch
obsolete
>--- csync2.c.orig 2013-05-02 12:58:04 UTC >+++ csync2.c >@@ -256,7 +256,7 @@ static int csync_server_bind(void) > struct addrinfo hints; > struct addrinfo *result, *rp; > int save_errno; >- int sfd = -1, s, on = 1; >+ int sfd = -1, s, off = 0, on = 1; > memset(&hints, 0, sizeof(struct addrinfo)); > hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ > hints.ai_socktype = SOCK_STREAM; >@@ -284,6 +284,9 @@ static int csync_server_bind(void) > goto error; > if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, (socklen_t) sizeof(on)) < 0) > goto error; >+ if (rp->ai_family == AF_INET6) >+ if (setsockopt(sfd, IPPROTO_IPV6, IPV6_V6ONLY, &off, (socklen_t) sizeof(off)) < 0) >+ goto error; > > if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0) > break; /* Success */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
tijl
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 208928
: 169678