From 09639a16549346b83ff274a8b200867b9800382c Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Fri, 30 Sep 2011 11:59:44 -0300 Subject: [PATCH] Fix backwards condition in IP header inspection for TCP tunnels --- src/nepi/util/tunchannel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nepi/util/tunchannel.py b/src/nepi/util/tunchannel.py index 23abbe88..fcb57df2 100644 --- a/src/nepi/util/tunchannel.py +++ b/src/nepi/util/tunchannel.py @@ -113,7 +113,7 @@ def _pullPacket(buf, ether_mode=False, len=len): else: _,totallen = struct.unpack('HH',buf[0][:4]) totallen = socket.htons(totallen) - if len(buf[0]) < totallen: + if len(buf[0]) > totallen: rv = buf[0][:totallen] buf[0] = buf[0][totallen:] else: -- 2.47.0