On Wed, Sep 30, 2009 at 11:21:41PM +0200, JuanJo Ciarlante wrote:
> On Wed, Sep 30, 2009 at 8:47 PM, Marcel Pennewiß
> <mailingli...@pennewiss.de>wrote:
> 
> > On Wednesday 30 September 2009 20:20:40 JuanJo Ciarlante wrote:
> > > Could you please copy me the the exact cmdline and context (inetd?)
> > > you are using in both cases?, also if there's any extra patch applied,
> > etc.
> >
> > /usr/sbin/openvpn --config /etc/openvpn/tcp.conf --writepid
> > /var/run/openvpn.tcp.pid --daemon --setenv
> > SVCNAME openvpn.tcp --cd /etc/openvpn
> >
> > /etc/openvpn/tcp.conf:
> > port 897
> > proto tcp6-server
> > dev tap1
> > server-bridge 192.168.42.253 255.255.255.0 192.168.42.1 192.168.42.200
> >
> > tls-server
> > dh /etc/openvpn/files/dh2048.pem
> > ca /etc/openvpn/files/ca.pem
> > cert /etc/openvpn/files/cert.pem
> > key /etc/openvpn/files/key.pem
> > comp-lzo
> > client-to-client
> > client-config-dir /etc/openvpn/clients
> > persist-tun
> > persist-key
> > keepalive 10 120
> > script-security 2
> > user nobody
> > group nogroup
> > verb 3
> >
> > patch applied from gentoo ebuild:
> > --- socket.c~   2008-11-02 01:39:00.406009999 +0100
> > +++ socket.c    2008-11-02 01:39:00.406009999 +0100
> > @@ -22,6 +22,7 @@
> >  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> >  */
> >
> > +#define _GNU_SOURCE
> >  #include "syshead.h"
> >
> >  #include "socket.h"
> >
> > thx,
> >
> 
> Cool ... it's crashing for me also (yaY!) , it's something in the
> multi-client path
> that I hadn't handled, will work on it tomorrow.

Please apply this patch:
>From 3afb64b8255fa28e488e793259b2f3de94840b01 Mon Sep 17 00:00:00 2001
From: JuanJo Ciarlante <j...@google.com>
List-Post: openvpn-devel@lists.sourceforge.net
Date: Thu, 1 Oct 2009 00:15:12 +0200
Subject: [PATCH] * fix multi-tcp crash (corrected assertion)

---
 mtcp.c   |    6 +++++-
 socket.c |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/mtcp.c b/mtcp.c
index f578429..7e2b07d 100644
--- a/mtcp.c
+++ b/mtcp.c
@@ -153,7 +153,11 @@ multi_tcp_instance_specific_init (struct multi_context *m, 
struct multi_instance
   ASSERT (mi->context.c2.link_socket);
   ASSERT (mi->context.c2.link_socket->info.lsa);
   ASSERT (mi->context.c2.link_socket->mode == LS_MODE_TCP_ACCEPT_FROM);
-  ASSERT (mi->context.c2.link_socket->info.lsa->actual.dest.addr.sa.sa_family 
== AF_INET);
+  ASSERT (mi->context.c2.link_socket->info.lsa->actual.dest.addr.sa.sa_family 
== AF_INET
+#ifdef USE_PF_INET6
+         || 
mi->context.c2.link_socket->info.lsa->actual.dest.addr.sa.sa_family == AF_INET6
+#endif
+         );
   if (!mroute_extract_openvpn_sockaddr (&mi->real, 
&mi->context.c2.link_socket->info.lsa->actual.dest, true))
     {
       msg (D_MULTI_ERRORS, "MULTI TCP: TCP client address is undefined");
diff --git a/socket.c b/socket.c
index 00d841e..97e6234 100644
--- a/socket.c
+++ b/socket.c
@@ -1616,7 +1616,11 @@ link_socket_init_phase1 (struct link_socket *sock,
   if (mode == LS_MODE_TCP_ACCEPT_FROM)
     {
       ASSERT (accept_from);
-      ASSERT (sock->info.proto == PROTO_TCPv4_SERVER);
+      ASSERT (sock->info.proto == PROTO_TCPv4_SERVER
+#ifdef USE_PF_INET6
+             || sock->info.proto == PROTO_TCPv6_SERVER
+#endif
+            );
       ASSERT (!sock->inetd);
       sock->sd = accept_from->sd;
     }
-- 
1.5.4.3

I tested your config upto full connection, and seems to work.

Cheers,
-- 
--JuanJo ; echo j...@gomosglep.com | sed 's/[SPAM]//g'

Reply via email to