Fix backwards condition in IP header inspection for TCP tunnels
authorClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Fri, 30 Sep 2011 14:59:44 +0000 (11:59 -0300)
committerClaudio-Daniel Freire <claudio-daniel.freire@inria.fr>
Fri, 30 Sep 2011 14:59:44 +0000 (11:59 -0300)
src/nepi/util/tunchannel.py

index 23abbe8..fcb57df 100644 (file)
@@ -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: