diff --git a/scapy/layers/ldap.py b/scapy/layers/ldap.py index 494809a6ab7..26db10ce838 100644 --- a/scapy/layers/ldap.py +++ b/scapy/layers/ldap.py @@ -729,6 +729,8 @@ def answers(self, other): return isinstance(other, LDAP) and other.messageID == self.messageID def mysummary(self): + if not self.protocolOp or not self.messageID: + return "" return ( "%s(%s)" % ( diff --git a/test/regression.uts b/test/regression.uts index e182f92b96e..09296a0b141 100644 --- a/test/regression.uts +++ b/test/regression.uts @@ -2338,6 +2338,11 @@ except Scapy_Exception: file = BytesIO(b"\n\r\r\n\x00\x00\x008\x1a+