<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Apr 15, 2025 at 5:51 AM Luca Vizzarro <<a href="mailto:luca.vizzarro@arm.com">luca.vizzarro@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">NICs like the Intel E810-C often produce ICMP packets. These packets<br>
are stray and can interfere with testing. Therefore, add an ICMP<br>
filtering option in the packet filter.<br></blockquote><div><br></div><div>Okay, this sounds harmless. But, is Paul okay with this approach? My understanding is that he wants the testsuites to be written such that they don't require that the wire is "quiet" from LLDP, ICMP etc.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br><br>
@@ -234,10 +237,23 @@ def _set_packet_filter(self, filter_config: PacketFilteringConfig):<br>
<br>
def _filter(packet: Packet) -> bool:<br>
if ether := packet.getlayer(Ether):<br>
- if filter_config.no_arp and ether.type == 0x0806:<br>
+ if filter_config.no_arp and ether.type == ETHER_TYPES.ARP:<br>
return False<br>
<br>
- if filter_config.no_lldp and ether.type == 0x88CC:<br>
+ if filter_config.no_lldp and ether.type == ETHER_TYPES.LLDP:<br>
+ return False<br>
+<br>
+ if ipv4 := packet.getlayer(IP):<br>
+ if filter_config.no_icmp and ipv4.proto == IP_PROTOS.icmp:<br>
+ return False<br>
+<br>
+ if ipv6 := packet.getlayer(IPv6):<br>
+ next_header = ipv6.nh<br>
+<br>
+ if next_header == IP_PROTOS.hopopt:<br>
+ next_header = ipv6.payload.nh<br>
+<br>
+ if filter_config.no_icmp and next_header == IP_PROTOS.ipv6_icmp:<br>
return False<br>
<br>
return True<br>
-- <br>
2.43.0<br>
<br></blockquote><div><br></div><div>^Looks good, thanks. </div><div><br></div><div>Reviewed-By: Patrick Robb <<a href="mailto:probb@iol.unh.edu">probb@iol.unh.edu</a>> </div></div></div>