]>
git.proxmox.com Git - mirror_iproute2.git/blob - testsuite/tests/ss/ssfilter.t
6 # LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
7 # ESTAB 0 0 10.0.0.1:22 10.0.0.1:36266
8 # ESTAB 0 0 10.0.0.1:36266 10.0.0.1:22
9 # ESTAB 0 0 10.0.0.1:22 10.0.0.2:50312
10 export TCPDIAG_FILE
="$(dirname $0)/ss1.dump"
12 ts_log
"[Testing ssfilter]"
14 ts_ss
"$0" "Match dport = 22" -Htna dport
= 22
15 test_on
"ESTAB 0 0 10.0.0.1:36266 10.0.0.1:22"
17 ts_ss
"$0" "Match dport 22" -Htna dport
22
18 test_on
"ESTAB 0 0 10.0.0.1:36266 10.0.0.1:22"
20 ts_ss
"$0" "Match (dport)" -Htna '( dport = 22 )'
21 test_on
"ESTAB 0 0 10.0.0.1:36266 10.0.0.1:22"
23 ts_ss
"$0" "Match src = 0.0.0.0" -Htna src
= 0.0.0.0
24 test_on
"LISTEN 0 128 0.0.0.0:22 0.0.0.0:*"
26 ts_ss
"$0" "Match src 0.0.0.0" -Htna src
0.0.0.0
27 test_on
"LISTEN 0 128 0.0.0.0:22 0.0.0.0:*"
29 ts_ss
"$0" "Match src sport" -Htna src
0.0.0.0 sport
= 22
30 test_on
"LISTEN 0 128 0.0.0.0:22 0.0.0.0:*"
32 ts_ss
"$0" "Match src and sport" -Htna src
0.0.0.0 and sport
= 22
33 test_on
"LISTEN 0 128 0.0.0.0:22 0.0.0.0:*"
35 ts_ss
"$0" "Match src and sport and dport" -Htna src
10.0.0.1 and sport
= 22 and dport
= 50312
36 test_on
"ESTAB 0 0 10.0.0.1:22 10.0.0.2:50312"
38 ts_ss
"$0" "Match src and sport and (dport)" -Htna 'src 10.0.0.1 and sport = 22 and ( dport = 50312 )'
39 test_on
"ESTAB 0 0 10.0.0.1:22 10.0.0.2:50312"
41 ts_ss
"$0" "Match src and (sport and dport)" -Htna 'src 10.0.0.1 and ( sport = 22 and dport = 50312 )'
42 test_on
"ESTAB 0 0 10.0.0.1:22 10.0.0.2:50312"
44 ts_ss
"$0" "Match (src and sport) and dport" -Htna '( src 10.0.0.1 and sport = 22 ) and dport = 50312'
45 test_on
"ESTAB 0 0 10.0.0.1:22 10.0.0.2:50312"
47 ts_ss
"$0" "Match (src or src) and dst" -Htna '( src 0.0.0.0 or src 10.0.0.1 ) and dst 10.0.0.2'
48 test_on
"ESTAB 0 0 10.0.0.1:22 10.0.0.2:50312"