]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
svn merge -r 672:731 $SO/trunk/openvpn
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 26 Oct 2005 23:46:30 +0000 (23:46 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Wed, 26 Oct 2005 23:46:30 +0000 (23:46 +0000)
Merged multi.c:1586 assertion fix attempt
from trunk.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@732 e7ae566f-a301-0410-adde-c780ea21d3b5

ChangeLog
forward.c
multi.c

index 476dcdf996e57a3f1b4dbc78e541361c1ff085a1..edfc588a4da23a0895b652dc62f5b036730d1778 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,12 @@ $Id$
 
 2005.10.xx -- Version 2.1-beta5
 
+* Fix attempt of assertion at multi.c:1586 (note that
+  this precise line number will vary across different
+  versions of OpenVPN).
 * More PKCS#11 additions/changes (Alon Bar-Lev).
+* Added ".PHONY: plugin" to Makefile.am to work around
+  "make dist" issue.
 * Fixed double fork issue that occurs when --management-hold
   is used.
 * Moved TUN/TAP read/write log messages from --verb 8 to 6.
index 9146aa1bbb74106866219c601bfcf1f2f2a2ce87..ae2122fed85b659b1054fb5b123e2139f78a4d32 100644 (file)
--- a/forward.c
+++ b/forward.c
@@ -610,9 +610,9 @@ read_incoming_link (struct context *c)
    */
   int status;
 
-  perf_push (PERF_READ_IN_LINK);
+  /*ASSERT (!c->c2.to_tun.len);*/
 
-  ASSERT (!c->c2.to_tun.len);
+  perf_push (PERF_READ_IN_LINK);
 
   c->c2.buf = c->c2.buffers->read_link_buf;
   ASSERT (buf_init (&c->c2.buf, FRAME_HEADROOM_ADJ (&c->c2.frame, FRAME_HEADROOM_MARKER_READ_LINK)));
@@ -839,12 +839,12 @@ process_incoming_link (struct context *c)
 void
 read_incoming_tun (struct context *c)
 {
-  perf_push (PERF_READ_IN_TUN);
-
   /*
    * Setup for read() call on TUN/TAP device.
    */
-  ASSERT (!c->c2.to_link.len);
+  /*ASSERT (!c->c2.to_link.len);*/
+
+  perf_push (PERF_READ_IN_TUN);
 
   c->c2.buf = c->c2.buffers->read_tun_buf;
 #ifdef TUN_PASS_BUFFER
@@ -1091,13 +1091,14 @@ process_outgoing_tun (struct context *c)
 {
   struct gc_arena gc = gc_new ();
 
-  perf_push (PERF_PROC_OUT_TUN);
-
   /*
    * Set up for write() call to TUN/TAP
    * device.
    */
-  ASSERT (c->c2.to_tun.len > 0);
+  if (c->c2.to_tun.len <= 0)
+    return;
+
+  perf_push (PERF_PROC_OUT_TUN);
 
   /*
    * The --mssfix option requires
diff --git a/multi.c b/multi.c
index e3444df47ae326362da73e9f3193cd3da8232b9a..45cdf5c98a9e002236175142b6d3a330abd00c8b 100644 (file)
--- a/multi.c
+++ b/multi.c
@@ -1728,7 +1728,8 @@ multi_process_incoming_link (struct multi_context *m, struct multi_instance *ins
   struct multi_instance *mi;
   bool ret = true;
 
-  ASSERT (!m->pending);
+  if (m->pending)
+    return true;
 
   if (!instance)
     {
@@ -1882,7 +1883,8 @@ multi_process_incoming_tun (struct multi_context *m, const unsigned int mpp_flag
       printf ("TUN -> TCP/UDP [%d]\n", BLEN (&m->top.c2.buf));
 #endif
 
-      ASSERT (!m->pending);
+      if (m->pending)
+       return true;
 
       /* 
        * Route an incoming tun/tap packet to