From f9cd967bfae5a048b8cfd74e949d671e139f6e5c Mon Sep 17 00:00:00 2001
From: Dmitriy Dubson <d.dubson@gmail.com>
Date: Tue, 13 Dec 2016 18:29:54 -0500
Subject: [PATCH] [bug] fix issue with python-pcapy interface next() function
 not properly catching if next packet does not exist.

---
 scapy/arch/pcapdnet.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scapy/arch/pcapdnet.py b/scapy/arch/pcapdnet.py
index 09bbe8de..d3aadb6f 100755
--- a/scapy/arch/pcapdnet.py
+++ b/scapy/arch/pcapdnet.py
@@ -390,6 +390,8 @@ if conf.use_pcap:
                         return None
                     else:
                         h,p = c
+                        if h is None:
+                            return
                         s,us = h.getts()
                         return (s+0.000001*us), p
                 def fileno(self):
-- 
GitLab