From 7c108bece1d66380cb3f203ffdd5a955e86493cb Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Thu, 25 Apr 2024 18:18:46 +0100 Subject: [PATCH] Exclude link local for arp --- modules/test/conn/python/src/connection_module.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/test/conn/python/src/connection_module.py b/modules/test/conn/python/src/connection_module.py index 34e129103..612ffd060 100644 --- a/modules/test/conn/python/src/connection_module.py +++ b/modules/test/conn/python/src/connection_module.py @@ -105,7 +105,12 @@ def _connection_switch_arp_inspection(self): # Check MAC address matches IP address if (arp_packet.hwsrc == self._device_mac - and (arp_packet.psrc not in (self._device_ipv4_addr, '0.0.0.0'))): + and (arp_packet.psrc not in ( + self._device_ipv4_addr, + '0.0.0.0' + )) and not arp_packet.psrc.startswith( + '169.254' + )): LOGGER.info(f'Bad ARP packet detected for MAC: {self._device_mac}') LOGGER.info(f'''ARP packet from IP {arp_packet.psrc} does not match {self._device_ipv4_addr}''')