Skip to content

Commit 66941d5

Browse files
committed
TESTrun: Add apply filter tests for DLT_SLIP.
Capture the current behaviour of "inbound" and "outbound" applied to Rx, Tx and invalid packet direction. Note how "outbound" matches a packet with an invalid direction value (0xE7). The .pcap files come from tcpdump tests.
1 parent 2559282 commit 66941d5

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

testprogs/TESTrun

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10037,6 +10037,36 @@ my %apply_blocks = (
1003710037
expr => 'ip6 dst 10::1',
1003810038
results => [0, 0, 0, 0, 0, 0, 65535, 0, 0, 0],
1003910039
},
10040+
slip_inbound_on_invalid => {
10041+
savefile => 'slip-bad-direction.pcap',
10042+
expr => 'inbound',
10043+
results => [0],
10044+
},
10045+
slip_outbound_on_invalid => {
10046+
savefile => 'slip-bad-direction.pcap',
10047+
expr => 'outbound',
10048+
results => [262144],
10049+
},
10050+
slip_inbound_on_rx => {
10051+
savefile => 'slip-compressed_sl_print-oobr.pcap',
10052+
expr => 'inbound',
10053+
results => [46],
10054+
},
10055+
slip_outbound_on_rx => {
10056+
savefile => 'slip-compressed_sl_print-oobr.pcap',
10057+
expr => 'outbound',
10058+
results => [0],
10059+
},
10060+
slip_inbound_on_tx => {
10061+
savefile => 'slip-sliplink_print-oobr.pcap',
10062+
expr => 'inbound',
10063+
results => [0],
10064+
},
10065+
slip_outbound_on_tx => {
10066+
savefile => 'slip-sliplink_print-oobr.pcap',
10067+
expr => 'outbound',
10068+
results => [46],
10069+
},
1004010070
);
1004110071

1004210072
# * DLT, expr, netmask and skip: same as in accept_blocks above

tests/filter/slip-bad-direction.pcap

79 Bytes
Binary file not shown.
295 Bytes
Binary file not shown.
295 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)