Date: Sun, 12 May 2002 20:48:45 +0900 From: Hajimu UMEMOTO <ume@mahoroba.org> To: quak@mydiax.ch Cc: freebsd-security@FreeBSD.org Subject: Re: IPSEC: is ipcomp broken in 4.5-stable ? Message-ID: <yge4rhda8o2.wl@mille.mahoroba.org> In-Reply-To: <200205121006.g4CA6FM01637@dubb05h07-0.dplanet.ch> References: <200205121006.g4CA6FM01637@dubb05h07-0.dplanet.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, >>>>> On Sun, 12 May 2002 12:06:15 +0200 >>>>> quak@mydiax.ch said: quak> ipcomp_decompress: inflate(Z_FINISH): unknown error (-2) and transfer will stall for 3-6 seconds, the proceed again. It seems it was broken by recent zlib change. Does this patch work for you? Index: sys/netinet6/ipcomp_core.c diff -u sys/netinet6/ipcomp_core.c.orig sys/netinet6/ipcomp_core.c --- sys/netinet6/ipcomp_core.c.orig Sun May 5 04:33:23 2002 +++ sys/netinet6/ipcomp_core.c Sun May 12 20:41:58 2002 @@ -252,14 +252,17 @@ MOREBLOCK(); } - zerror = mode ? inflate(&zs, Z_FINISH) + zerror = mode ? inflate(&zs, Z_SYNC_FLUSH) : deflate(&zs, Z_FINISH); if (zerror == Z_STREAM_END) break; - else if (zerror == Z_OK) - ; /* once more. */ - else { + else if (zerror == Z_OK) { + if (mode && zs.avail_out != 0) + goto terminate; + else + ; /* once more. */ + } else { if (zs.msg) { ipseclog((LOG_ERR, "ipcomp_%scompress: " "%sflate(Z_FINISH): %s\n", -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?yge4rhda8o2.wl>