Subversion Repositories lsh

Compare Revisions

Ignore whitespace Rev 64 → Rev 78

/tags/2.0.4-dfsg-7/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 (.../trunk/debian/patches) (revision 64)
+++ 00list (.../tags/2.0.4-dfsg-7/debian/patches) (revision 78)
@@ -3,3 +3,5 @@
40_better_errmsg_when_dotlsh_missing
nettle_2.0
blacklist
+terminate_on_connection_failure
+ipv6_v6only
Index: terminate_on_connection_failure.dpatch
===================================================================
--- terminate_on_connection_failure.dpatch (.../trunk/debian/patches) (nonexistent)
+++ terminate_on_connection_failure.dpatch (.../tags/2.0.4-dfsg-7/debian/patches) (revision 78)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## terminate_on_connection_failure.dpatch by Magnus Holmgren <holmgren@debian.org>
+##
+## DP: Call exit() in lsh's default exception handler on EXC_IO_CONNECT; otherwise
+## DP: lsh won't terminate.
+
+@DPATCH@
+diff -urNad trunk~/src/lsh.c trunk/src/lsh.c
+--- trunk~/src/lsh.c 2005-03-16 21:06:23.000000000 +0100
++++ trunk/src/lsh.c 2010-01-09 22:32:51.000000000 +0100
+@@ -959,6 +959,8 @@
+ *self->status = EXIT_FAILURE;
+
+ werror("%z, (errno = %i)\n", e->msg, exc->error);
++ if (e->type == EXC_IO_CONNECT)
++ exit(*self->status);
+ }
+ else
+ switch(e->type)
/terminate_on_connection_failure.dpatch
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property