diff options
author | marcus <marcus@FreeBSD.org> | 2010-08-16 05:52:32 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2010-08-16 05:52:32 +0800 |
commit | 1733eba2a124edf8caba7b65dc39ed484d8f232b (patch) | |
tree | 0ff991783735388aefc3da91643d0216fc072989 /net | |
parent | 80f4cd21ecbe3da09e586b84facd3311d2ea0f14 (diff) | |
download | freebsd-ports-gnome-1733eba2a124edf8caba7b65dc39ed484d8f232b.tar.gz freebsd-ports-gnome-1733eba2a124edf8caba7b65dc39ed484d8f232b.tar.zst freebsd-ports-gnome-1733eba2a124edf8caba7b65dc39ed484d8f232b.zip |
Add support for wildcard IPv4/6 sockets.
PR: 148022
Diffstat (limited to 'net')
-rw-r--r-- | net/netatalk/Makefile | 2 | ||||
-rw-r--r-- | net/netatalk/files/patch-libatalk_dsi_dsi_tcp.c | 39 |
2 files changed, 40 insertions, 1 deletions
diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile index d429a8b8032d..5548a11b1c56 100644 --- a/net/netatalk/Makefile +++ b/net/netatalk/Makefile @@ -7,7 +7,7 @@ PORTNAME= netatalk PORTVERSION= 2.1.3 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= net print MASTER_SITES= SF diff --git a/net/netatalk/files/patch-libatalk_dsi_dsi_tcp.c b/net/netatalk/files/patch-libatalk_dsi_dsi_tcp.c new file mode 100644 index 000000000000..894e9e164463 --- /dev/null +++ b/net/netatalk/files/patch-libatalk_dsi_dsi_tcp.c @@ -0,0 +1,39 @@ +--- libatalk/dsi/dsi_tcp.c.orig 2010-07-02 10:48:44.000000000 -0400 ++++ libatalk/dsi/dsi_tcp.c 2010-08-15 17:49:41.000000000 -0400 +@@ -277,19 +277,22 @@ int dsi_tcp_init(DSI *dsi, const char *h + { + int ret; + int flag; ++ int on; + struct addrinfo hints, *servinfo, *p; + + dsi->protocol = DSI_TCPIP; + + /* Prepare hint for getaddrinfo */ + memset(&hints, 0, sizeof hints); +- hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_NUMERICSERV; +- if ( ! address) ++ if ( ! address) { + hints.ai_flags |= AI_PASSIVE; +- else ++ hints.ai_family = AF_INET6; ++ } else { + hints.ai_flags |= AI_NUMERICHOST; ++ hints.ai_family = AF_UNSPEC; ++ } + + if ((ret = getaddrinfo(address ? address : NULL, port ? port : "548", &hints, &servinfo)) != 0) { + LOG(log_error, logtype_dsi, "dsi_tcp_init: getaddrinfo: %s\n", gai_strerror(ret)); +@@ -316,6 +319,10 @@ int dsi_tcp_init(DSI *dsi, const char *h + flag = 1; + setsockopt(dsi->serversock, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(flag)); + #endif ++#ifdef IPV6_BINDV6ONLY ++ on = 0; ++ setsockopt(dsi->serversock, IPPROTO_IPV6, IPV6_BINDV6ONLY, (char *)&on, sizeof (on)); ++#endif + + #ifdef USE_TCP_NODELAY + #ifndef SOL_TCP |