#2682 Backport changes to core PrimAITE
This commit is contained in:
@@ -143,7 +143,7 @@ class ARP(Service):
|
||||
self.sys_log.info(f"Cannot send ARP request to a network address {str(target_ip_address)}")
|
||||
return
|
||||
if target_ip_address == outbound_network_interface.ip_network.broadcast_address:
|
||||
self.sys_log.info(f"Cannot send ARP request to a broadcast address {str(target_ip_address)}")
|
||||
self.sys_log.info(f"Cannot send ARP request to a broadcast addresss {str(target_ip_address)}")
|
||||
return
|
||||
|
||||
self.sys_log.info(f"Sending ARP request from NIC {outbound_network_interface} for ip {target_ip_address}")
|
||||
|
||||
@@ -61,7 +61,7 @@ class ICMP(Service):
|
||||
if target_ip_address.is_loopback:
|
||||
self.sys_log.info("Pinging loopback address")
|
||||
return any(network_interface.enabled for network_interface in self.network_interfaces.values())
|
||||
self.sys_log.info(f"Pinging {target_ip_address}:", to_terminal=True)
|
||||
self.sys_log.info(f"Pinging {target_ip_address}:", to_terminal=False)
|
||||
sequence, identifier = 0, None
|
||||
while sequence < pings:
|
||||
sequence, identifier = self._send_icmp_echo_request(target_ip_address, sequence, identifier, pings)
|
||||
@@ -77,7 +77,7 @@ class ICMP(Service):
|
||||
f"Received = {request_replies}, "
|
||||
f"Lost = {pings - request_replies} ({(pings - request_replies) / pings * 100}% loss)"
|
||||
)
|
||||
self.sys_log.info(output, to_terminal=True)
|
||||
self.sys_log.info(output, to_terminal=False)
|
||||
|
||||
return passed
|
||||
|
||||
@@ -167,7 +167,7 @@ class ICMP(Service):
|
||||
f"bytes={len(frame.payload)}, "
|
||||
f"time={time_str}, "
|
||||
f"TTL={frame.ip.ttl}",
|
||||
to_terminal=True,
|
||||
to_terminal=False,
|
||||
)
|
||||
if not self.request_replies.get(frame.icmp.identifier):
|
||||
self.request_replies[frame.icmp.identifier] = 0
|
||||
|
||||
Reference in New Issue
Block a user