From d10b482b7c84fa323a300568fb894ce6127a2dce Mon Sep 17 00:00:00 2001 From: Nils Weiss Date: Wed, 11 Dec 2024 00:48:26 +0100 Subject: [PATCH] Add ValueError to except in L2Socket.close() (#4607) --- scapy/arch/linux/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scapy/arch/linux/__init__.py b/scapy/arch/linux/__init__.py index ec1f2f480e2..f4e380487ba 100644 --- a/scapy/arch/linux/__init__.py +++ b/scapy/arch/linux/__init__.py @@ -276,7 +276,7 @@ def close(self): try: if self.promisc and getattr(self, "ins", None): set_promisc(self.ins, self.iface, 0) - except (AttributeError, OSError): + except (AttributeError, OSError, ValueError): pass SuperSocket.close(self)