Skip to content

Commit a40bc5c

Browse files
committed
TESTrun: Add a test for "ip broadcast" with 0 netmask.
1 parent 5ff3c5e commit a40bc5c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

testprogs/TESTrun

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,6 +4534,22 @@ my %accept_blocks = (
45344534
(006) ret #262144
45354535
',
45364536
}, # ip_broadcast_24
4537+
ip_broadcast_0 => {
4538+
# tcpdump does this by default (matches 0.0.0.0 and 255.255.255.255).
4539+
DLT => 'RAW',
4540+
netmask => '0.0.0.0',
4541+
aliases => ['ip broadcast'],
4542+
opt => '
4543+
(000) ldb [0]
4544+
(001) and #0xf0
4545+
(002) jeq #0x40 jt 3 jf 7
4546+
(003) ld [16]
4547+
(004) jeq #0x0 jt 6 jf 5
4548+
(005) jeq #0xffffffff jt 6 jf 7
4549+
(006) ret #262144
4550+
(007) ret #0
4551+
',
4552+
}, # ip_broadcast_0
45374553

45384554
ip_proto => {
45394555
DLT => 'EN10MB',

0 commit comments

Comments
 (0)