aboutsummaryrefslogtreecommitdiff
path: root/forward.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-26 23:46:30 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-26 23:46:30 +0000
commitba3ff466e8c42b4f22a445106554e46ae86463ac (patch)
tree9111e5840ce92df376d1420d2ee9e91f971311a2 /forward.c
parentMerge with https://svn.openvpn.net/projects/openvpn/contrib/alon/BETA21@726 (diff)
downloadopenvpn-ba3ff466e8c42b4f22a445106554e46ae86463ac.tar.xz
svn merge -r 672:731 $SO/trunk/openvpn
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
Diffstat (limited to '')
-rw-r--r--forward.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/forward.c b/forward.c
index 9146aa1..ae2122f 100644
--- 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