On Tue, 2007-05-01 at 09:27 +0200, Stefan Wenk wrote:
> Now I have changed these modifications 
> back, and I do not see more debug information except those below:
> 
> z_decompress0: Would have triggered an error as inflate returned -5 ()
> z_decompress0: Would have triggered an error as inflate returned -5 ()
> z_decompress0: Would have triggered an error as inflate returned -5 ()
> ..
> As there are no debug logs in inflate.c I can't provide more information by 
> now.

I had a look at that trace you sent, the echo and replys were normal but
obviously something is going wrong and it tries to negotiate turning off
the compression...

Having looked at the code a bit further, I have a theory that it was
impossible to reach the zlib_inflateSyncPacket call ppp deflate needs.
The patch below fixes that and also adds some debugging so if that isn't
the problem, we might get some further clues as to what the problem
is...

Thanks for the patience :)

Richard

Index: linux/drivers/net/ppp_deflate.c
===================================================================
--- linux.orig/drivers/net/ppp_deflate.c        2007-01-18 00:52:50.000000000 
+0000
+++ linux/drivers/net/ppp_deflate.c     2007-05-01 22:21:27.000000000 +0100
@@ -488,6 +488,13 @@ int z_decompress(void *arg, unsigned cha
        for (;;) {
                r = zlib_inflate(&state->strm, Z_PACKET_FLUSH);
                if (r != Z_OK) {
+                       printk(KERN_ERR "z_decompress%d: inflate returned %d 
(%s)"
+                               ",av in %d, av out %d, t in %ld, t out %ld, dp 
%d,"
+                               " of %d, is %d, os %d\n",
+                               state->unit, r, (state->strm.msg? 
state->strm.msg: ""),
+                               state->strm.avail_in, state->strm.avail_out,
+                               state->strm.total_in, state->strm.total_out,
+                               decode_proto, overflow, isize, osize);
                        if (state->debug)
                                printk(KERN_DEBUG "z_decompress%d: inflate 
returned %d (%s)\n",
                                       state->unit, r, (state->strm.msg? 
state->strm.msg: ""));
Index: linux/lib/zlib_inflate/inflate.c
===================================================================
--- linux.orig/lib/zlib_inflate/inflate.c       2007-01-18 00:53:08.000000000 
+0000
+++ linux/lib/zlib_inflate/inflate.c    2007-05-01 22:03:53.000000000 +0100
@@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flu
 
     strm->data_type = state->bits + (state->last ? 64 : 0) +
                       (state->mode == TYPE ? 128 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
 
     if (flush == Z_PACKET_FLUSH && ret == Z_OK &&
             (strm->avail_out != 0 || strm->avail_in == 0))
                return zlib_inflateSyncPacket(strm);
+
+    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
+        ret = Z_BUF_ERROR;
+
     return ret;
 }
 




-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to