From: Claudio-Daniel Freire Date: Fri, 30 Sep 2011 14:59:44 +0000 (-0300) Subject: Fix backwards condition in IP header inspection for TCP tunnels X-Git-Tag: nepi-3.0.0~201 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=09639a16549346b83ff274a8b200867b9800382c;p=nepi.git Fix backwards condition in IP header inspection for TCP tunnels --- 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: