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: patches/00list
===================================================================
--- patches/00list (revision 72)
+++ patches/00list (revision 73)
@@ -4,3 +4,4 @@
nettle_2.0
blacklist
terminate_on_connection_failure
+ipv6_v6only
Index: changelog
===================================================================
--- changelog (revision 72)
+++ changelog (revision 73)
@@ -2,8 +2,12 @@
* terminate_on_connection_failure.dpatch (new): Make sure that lsh exits
if it fails to connect to the remote host (Closes: #485812).
+ * ipv6_v6only.dpatch (new): Set the IPV6_V6ONLY socket option on
+ AF_INET6 sockets; since lshd by default enumerates available address
+ families and calls bind() once for each, conflicts will occur
+ otherwise.
- -- Magnus Holmgren <holmgren@debian.org> Sun, 10 Jan 2010 13:36:31 +0100
+ -- Magnus Holmgren <holmgren@debian.org> Tue, 27 Jul 2010 03:15:38 +0200
lsh-utils (2.0.4-dfsg-6) unstable; urgency=low