From baa4a3fc7aecc4a88a25d1394403ef3caadcbde2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Nikitsin Date: Thu, 14 Aug 2025 11:52:49 +0200 Subject: [PATCH] fix ip.dst keyerror --- modules/test/tls/python/src/tls_util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/test/tls/python/src/tls_util.py b/modules/test/tls/python/src/tls_util.py index 0dd631c4d..37d7decdb 100644 --- a/modules/test/tls/python/src/tls_util.py +++ b/modules/test/tls/python/src/tls_util.py @@ -695,8 +695,10 @@ def get_tls_client_connection_ips(self, client_mac, capture_files): tls_dst_ips = set() # Store unique destination IPs for packet in packets: - dst_ip = ipaddress.ip_address(packet['_source']['layers']['ip.dst'][0]) - tls_dst_ips.add(str(dst_ip)) + # Extract the destination IP address + if 'ip.dst' in packet['_source']['layers']: + dst_ip = ipaddress.ip_address(packet['_source']['layers']['ip.dst'][0]) + tls_dst_ips.add(str(dst_ip)) return tls_dst_ips # Check if the device has made any outbound connections that use any