openbsd-ports/net/scapy/patches/patch-scapy_arch_pcapdnet_py
armani e0dc60b4c3 Update to 2.1.0, change my email address and integrate 2 patches from
Laurent Ghigonis, one to properly detect the mac address and the other to close
the bpf after use (You don't need to create 40 bpf anymore), thanks !

ok sthen@
2010-10-05 09:18:05 +00:00

13 lines
625 B
Plaintext

$OpenBSD: patch-scapy_arch_pcapdnet_py,v 1.1 2010/10/05 09:18:05 armani Exp $
--- scapy/arch/pcapdnet.py.orig Tue Oct 5 10:14:39 2010
+++ scapy/arch/pcapdnet.py Tue Oct 5 10:16:27 2010
@@ -63,6 +63,8 @@ if conf.use_pcap:
return ts,pkt
def __getattr__(self, attr):
return getattr(self.pcap, attr)
+ def __del__(self):
+ os.close(self.pcap.fileno())
open_pcap = lambda *args,**kargs: _PcapWrapper_libpcap(*args,**kargs)
elif hasattr(pcap,"open_live"): # python-pcapy
class _PcapWrapper_pcapy: