From 8282febfc281d17ccb67b3ec860ea40be3101f93 Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Tue, 22 Oct 2024 12:59:37 +0100 Subject: [PATCH] Check if dhcp-1.pcap exists --- modules/test/conn/python/src/connection_module.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/test/conn/python/src/connection_module.py b/modules/test/conn/python/src/connection_module.py index 867d8a3ff..af75a8dd6 100644 --- a/modules/test/conn/python/src/connection_module.py +++ b/modules/test/conn/python/src/connection_module.py @@ -577,8 +577,13 @@ def _connection_ipv6_slaac(self): def _has_slaac_addres(self): packet_capture = (rdpcap(self.startup_capture_file) + - rdpcap(self.monitor_capture_file) + - rdpcap(DHCP_CAPTURE_FILE)) + rdpcap(self.monitor_capture_file)) + + try: + packet_capture += rdpcap(DHCP_CAPTURE_FILE) + except FileNotFoundError: + LOGGER.error('dhcp-1.pcap not found, ignoring') + sends_ipv6 = False for packet_number, packet in enumerate(packet_capture, start=1): if IPv6 in packet and packet.src == self._device_mac: