From: Denis Ovsienko Date: Fri, 21 Feb 2025 23:26:34 +0000 (+0000) Subject: TESTrun: Add a test for "ip broadcast" with 0 netmask. X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/a40bc5cae261c4a91dbd2d5e208b4971a1c11849 TESTrun: Add a test for "ip broadcast" with 0 netmask. --- diff --git a/testprogs/TESTrun b/testprogs/TESTrun index 22b07fb0..dd59dea7 100755 --- a/testprogs/TESTrun +++ b/testprogs/TESTrun @@ -4534,6 +4534,22 @@ my %accept_blocks = ( (006) ret #262144 ', }, # ip_broadcast_24 + ip_broadcast_0 => { + # tcpdump does this by default (matches 0.0.0.0 and 255.255.255.255). + DLT => 'RAW', + netmask => '0.0.0.0', + aliases => ['ip broadcast'], + opt => ' + (000) ldb [0] + (001) and #0xf0 + (002) jeq #0x40 jt 3 jf 7 + (003) ld [16] + (004) jeq #0x0 jt 6 jf 5 + (005) jeq #0xffffffff jt 6 jf 7 + (006) ret #262144 + (007) ret #0 + ', + }, # ip_broadcast_0 ip_proto => { DLT => 'EN10MB',