diff --git a/scapy/dadict.py b/scapy/dadict.py index c799b87c967d46d3f55062ac8a7d14a4af9354e7..c6cf847794c5289f59ccd27693bae49421090ddf 100644 --- a/scapy/dadict.py +++ b/scapy/dadict.py @@ -90,3 +90,5 @@ class DADict: return list(self.iterkeys()) def iterkeys(self): return (x for x in self.__dict__ if x and x[0] != "_") + def __len__(self): + return len(self.__dict__) diff --git a/test/regression.uts b/test/regression.uts index 107948886e870784d993c5e098bd92f8b464d1da..54c855d807f0624f09bf3ced425b20588d48902b 100644 --- a/test/regression.uts +++ b/test/regression.uts @@ -687,7 +687,7 @@ send_and_sniff(Ether()/IP(dst="secdev.org")/ICMP()) = __repr__ if conf.manufdb: - conf.manufdb + len(conf.manufdb) else: True