Subversion Repositories lsh

Compare Revisions

Regard whitespace Rev 72 → Rev 73

/trunk/debian/patches/ipv6_v6only.dpatch
0,0 → 1,25
#! /bin/sh /usr/share/dpatch/dpatch-run
## ipv6_v6only.dpatch by Magnus Holmgren <holmgren@debian.org>
##
## DP: Set the IPV6_V6ONLY socket option on AF_INET6 sockets; since
## DP: lshd by default enumerates available address families and calls
## DP: bind() once for each, conflicts will occur otherwise.
 
@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/src/io.c trunk/src/io.c
--- trunk~/src/io.c 2006-01-23 18:49:58.000000000 +0100
+++ trunk/src/io.c 2010-07-27 02:17:04.000000000 +0200
@@ -1690,6 +1690,13 @@
{
int yes = 1;
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof yes);
+#if WITH_IPV6 && defined (IPV6_V6ONLY)
+ if (local->sa_family == AF_INET6)
+ {
+ if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0)
+ werror("setsockopt IPV6_V6ONLY failed: %e.\n", errno);
+ }
+#endif
}
if (bind(s, local, length) < 0)
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: 00list
===================================================================
--- 00list (revision 72)
+++ 00list (revision 73)
@@ -4,3 +4,4 @@
nettle_2.0
blacklist
terminate_on_connection_failure
+ipv6_v6only