diff --git a/umit/pm/backend/scapy/packet.py b/umit/pm/backend/scapy/packet.py index e8d3163..8d7c8e0 100644 --- a/umit/pm/backend/scapy/packet.py +++ b/umit/pm/backend/scapy/packet.py @@ -289,7 +289,7 @@ def reset(self, protocol=None, startproto=None, field=None): # proto filtering is active and the current is not # the target protocol. - current = find.payload + current = current.payload continue if field is not None: @@ -301,7 +301,7 @@ def reset(self, protocol=None, startproto=None, field=None): # Ok. Let's return because we have reached our # field! - return + return True else: # If we are here we should reset all the fields! # kill them all man! @@ -314,10 +314,12 @@ def reset(self, protocol=None, startproto=None, field=None): # at this point so it's safe to return if protocol_found: - return + return True current = current.payload + return False + def haslayer(self, layer): return bool(self.root.haslayer(layer))