-
Notifications
You must be signed in to change notification settings - Fork 735
/
Copy pathdpip.log
270 lines (269 loc) · 16.8 KB
/
dpip.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
global
[ OK ] ./bin/dpip ipset list
[ OK ] ./bin/dpip ipset show
bitmap:ip
[ OK ] ./bin/dpip ipset create foo bitmap:ip range 192.168.0.0/16
[ OK ] ./bin/dpip ipset add foo 192.168.1.0/26
[ OK ] ./bin/dpip ipset test foo 192.168.1.32 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.2.1 EXPECT false
[ OK ] ./bin/dpip ipset add foo 192.168.2.1
[ OK ] ./bin/dpip ipset test foo 192.168.2.1 EXPECT true
[ OK ] ./bin/dpip ipset add foo 10.100.100.100
[ OK ] ./bin/dpip ipset test foo 10.100.100.100 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
bitmap:port
[ OK ] ./bin/dpip ipset create foo bitmap:port range 0-65535
[ OK ] ./bin/dpip ipset add foo tcp:80
[ OK ] ./bin/dpip ipset add foo tcp:8080
[ OK ] ./bin/dpip ipset test foo tcp:80 EXPECT true
[ OK ] ./bin/dpip ipset test foo tcp:8080 EXPECT true
[ OK ] ./bin/dpip ipset test foo udp:80 EXPECT false
[ OK ] ./bin/dpip ipset test foo tcp:41235 EXPECT false
[ OK ] ./bin/dpip ipset add foo udp:80
[ OK ] ./bin/dpip ipset test foo udp:80 EXPECT true
[ OK ] ./bin/dpip ipset del foo tcp:8080
[ OK ] ./bin/dpip ipset test foo tcp:8080 EXPECT false
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset destroy foo
bitmap:ip,mac
[ OK ] ./bin/dpip ipset create foo bitmap:ip,mac range 192.168.0.0/16
[ OK ] ./bin/dpip ipset add foo 192.168.1.1,12:34:56:78:9A:BC
[ OK ] ./bin/dpip ipset add foo 192.168.2.2
[ OK ] ./bin/dpip ipset test foo 192.168.1.1,12:34:56:78:9A:BC EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.1.1,12:34:56:78:A9:BC EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.1.1,0:0:0:0:0:0 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.1.1 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.2.2 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.2.2,1:2:3:4:5:6 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.2.1 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
hash:ip
[ OK ] ./bin/dpip ipset create foo hash:ip comment
[ OK ] ./bin/dpip ipset add foo 10.100.100.100 comment a-single-address
[ OK ] ./bin/dpip ipset add foo 192.168.1.0/24
[ OK ] ./bin/dpip ipset list foo
[ OK ] ./bin/dpip ipset test foo 10.100.100.100 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.1.12 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.2.0 EXPECT false
[ OK ] ./bin/dpip ipset test foo 0.0.0.0 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:ip hashsize 128 maxelem 4096
[ OK ] ./bin/dpip ipset add bar 2001::1
[ OK ] ./bin/dpip ipset add bar 2001::2:1
[ OK ] ./bin/dpip ipset add bar ::
[ OK ] ./bin/dpip ipset test bar 2001::2:1 EXPECT true
[ OK ] ./bin/dpip ipset test bar ::1 EXPECT false
[ OK ] ./bin/dpip ipset test bar :: EXPECT true
[ OK ] ./bin/dpip ipset destroy bar
hash:ip,port
[ OK ] ./bin/dpip ipset create foo hash:ip,port
[ OK ] ./bin/dpip ipset add foo 192.168.1.0/30,tcp:80-82
[ OK ] ./bin/dpip ipset add foo 192.168.1.0/30,udp:80-82
[ OK ] ./bin/dpip ipset -v test foo 192.168.1.1,tcp:81 EXPECT 192.168.1.1,tcp:81 is in set foo
[ OK ] ./bin/dpip ipset test foo 192.168.1.0,upd:80 EXPECT false
[ OK ] ./bin/dpip ipset add foo 172.27.1.3-172.27.1.5
[ OK ] ./bin/dpip ipset test foo 172.27.1.5 EXPECT true
[ OK ] ./bin/dpip ipset test foo 172.27.1.4,0 EXPECT true
[ OK ] ./bin/dpip ipset test foo 172.27.1.4,tcp:0 EXPECT false
[ OK ] ./bin/dpip ipset add foo 172.27.20.20-172.27.20.21,80-82
[ OK ] ./bin/dpip ipset test foo 172.27.20.20,81 EXPECT true
[ OK ] ./bin/dpip ipset test foo 172.27.20.20,tcp:81 EXPECT false
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:ip,port
[ OK ] ./bin/dpip ipset add bar 2001::1,tcp:8080-8082
[ OK ] ./bin/dpip ipset add bar 2001::1,udp:80
[ OK ] ./bin/dpip ipset add bar 2001::2,0
[ OK ] ./bin/dpip ipset test bar 2001::1,tcp:8081 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1,udp:8081 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1,udp:80 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::2 EXPECT true
[ OK ] ./bin/dpip ipset destroy bar
hash:net
[ OK ] ./bin/dpip ipset create foo hash:net
[ OK ] ./bin/dpip ipset add foo 192.168.0.0/24
[ OK ] ./bin/dpip ipset add foo 10.1.0.0/16
[ OK ] ./bin/dpip ipset add foo 192.168.0.100/30 nomatch
[ OK ] ./bin/dpip ipset test foo 10.1.100.100 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.0.104 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.0.102 EXPECT false
[ OK ] ./bin/dpip ipset add foo 10.1.1.1 nomatch
[ OK ] ./bin/dpip ipset test foo 10.1.1.1 EXPECT false
[ OK ] ./bin/dpip ipset del foo 10.1.1.1
[ OK ] ./bin/dpip ipset test foo 10.1.1.1 EXPECT true
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:net
[ OK ] ./bin/dpip ipset add bar 2001::/64
[ OK ] ./bin/dpip ipset test bar 2001::4:3:2:1 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001:1::4:3:2:1 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1 EXPECT true
[ OK ] ./bin/dpip ipset add bar 2001::/120 nomatch
[ OK ] ./bin/dpip ipset test bar 2001::1 EXPECT false
[ OK ] ./bin/dpip ipset destroy bar
hash:ip,port,ip
[ OK ] ./bin/dpip ipset create foo hash:ip,port,ip comment
[ OK ] ./bin/dpip ipset add foo 192.168.1.16/30,tcp:8080-8082,192.168.2.100-192.168.2.105 comment a-test-range
[ OK ] ./bin/dpip ipset test foo 192.168.1.18,tcp:8081,192.168.2.101 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.1.16,tcp:8080,192.168.2.105 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.1.20,tcp:8081,192.168.2.101 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.1.18,tcp:8081,192.168.2.106 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.1.18,udp:8081,192.168.2.101 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.1.19,8081,192.168.2.101 EXPECT false
[ OK ] ./bin/dpip ipset del foo 192.168.1.18/31,tcp:8081,192.168.2.101
[ OK ] ./bin/dpip ipset test foo 192.168.1.18,tcp:8081,192.168.2.101 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:ip,port,ip
[ OK ] ./bin/dpip ipset add bar 2001::1,udp:80-82,2002::2
[ OK ] ./bin/dpip ipset add bar 2001::1,tcp:80-82,2002::2
[ OK ] ./bin/dpip ipset add bar 2001::1,80-82,2002::2
[ OK ] ./bin/dpip ipset test bar 2001::1,udp:81,2002::2 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1,tcp:80,2002::2 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1,82,2002::2 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::2,81,2002::2 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1,tcp:8080,2002::2 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1,udp:80,2002::1 EXPECT false
[ OK ] ./bin/dpip ipset del bar 2001::1,80-82,2002::2
[ OK ] ./bin/dpip ipset test bar 2001::1,82,2002::2 EXPECT false
[ OK ] ./bin/dpip ipset destroy bar
hash:net,port,net,port
[ OK ] ./bin/dpip ipset create foo hash:net,port,net,port
[ OK ] ./bin/dpip ipset add foo 192.168.10.0/24,0,192.168.20.0/24,0
[ OK ] ./bin/dpip ipset test foo 192.168.10.123,0,192.168.20.123,0 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.10.123,tcp:0,192.168.20.123,tcp:0 EXPECT false
[ OK ] ./bin/dpip ipset add foo 192.168.10.123,tcp:0,192.168.20.123,tcp:0
[ OK ] ./bin/dpip ipset test foo 192.168.10.123,tcp:0,192.168.20.123,tcp:0 EXPECT true
[ OK ] ./bin/dpip ipset add foo 192.168.10.64/26,0,192.168.20.64/26,0 nomatch
[ OK ] ./bin/dpip ipset test foo 192.168.10.123,0,192.168.20.123,0 EXPECT false
[ OK ] ./bin/dpip ipset add foo 192.168.10.123,0,192.168.20.123,0
[ OK ] ./bin/dpip ipset test foo 192.168.10.123,0,192.168.20.123,0 EXPECT true
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset add foo 10.64.68.0-10.64.68.100,tcp:80-82,10.128.0.0/16,tcp:8080
[ OK ] ./bin/dpip ipset list -v foo
[ OK ] ./bin/dpip ipset test foo 10.64.68.66,tcp:81,10.128.11.22,tcp:8080 EXPECT true
[ OK ] ./bin/dpip ipset add foo 10.64.68.64/29,tcp:81,10.128.11.0/24,tcp:8080 nomatch
[ OK ] ./bin/dpip ipset test foo 10.64.68.66,tcp:81,10.128.11.22,tcp:8080 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:net,port,net,port comment
[ OK ] ./bin/dpip ipset add bar 2001::a:b:c:d/64,udp:8080-8081,2002::/64,udp:6000-6001
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,udp:8080,2002::1:2:3:4,udp:6001 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4:5,udp:8080,2002::1:2:3:4,udp:6001 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,udp:8080,2002::1:2:3:4:5,udp:6001 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,udp:8082,2002::1:2:3:4,udp:6001 EXPECT false
[ OK ] ./bin/dpip ipset add bar 2001::/64,udp:8080,2002::1:2:0:0/96,udp:6000-6001 nomatch comment bad-guys
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,udp:8080,2002::1:2:3:4,udp:6001 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,udp:8081,2002::1:2:3:4,udp:6001 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,udp:8080,2002::2:3:4:5,udp:6001 EXPECT true
[ OK ] ./bin/dpip ipset destroy bar
hash:net,port,iface
[ OK ] ./bin/dpip ipset create foo hash:net,port,iface comment
[ OK ] ./bin/dpip ipset add foo 10.64.13.131/16,tcp:80-82,dpdk0
[ OK ] ./bin/dpip ipset test foo 10.64.111.222,tcp:81,dpdk0 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.64.111.222,81,dpdk0 EXPECT false
[ OK ] ./bin/dpip ipset add foo 10.64.88.100-10.64.88.200,tcp:82,dpdk0 nomatch comment bad-guys
[ OK ] ./bin/dpip ipset list foo -v
[ OK ] ./bin/dpip ipset test foo 10.64.88.111,tcp:81,dpdk0 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.64.88.111,tcp:82,dpdk0 EXPECT false
[ OK ] ./bin/dpip ipset add foo 10.64.88.111,tcp:82,dpdk0 comment you-are-an-exception
[ OK ] ./bin/dpip ipset test foo 10.64.88.111,tcp:82,dpdk0 EXPECT true
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:net,port,iface hashsize 300 maxelem 1000
[ OK ] ./bin/dpip ipset add bar 2001:beef::/64,udp:100-102,dpdk0
[ OK ] ./bin/dpip ipset test bar 2001:beef::abcd,udp:100,dpdk0 EXPECT true
[ OK ] ./bin/dpip ipset add bar 2001:beef::abcd/100,udp:100,dpdk0 nomatch
[ OK ] ./bin/dpip ipset test bar 2001:beef::abcd,udp:100,dpdk0 EXPECT false
[ OK ] ./bin/dpip ipset del bar 2001:beef::abcd/100,udp:100,dpdk0
[ OK ] ./bin/dpip ipset test bar 2001:beef::abcd,udp:100,dpdk0 EXPECT true
[ OK ] ./bin/dpip ipset destroy bar
hash:net,port
[ OK ] ./bin/dpip ipset create foo hash:net,port comment
[ OK ] ./bin/dpip ipset add foo 192.168.100.0-192.168.102.30,tcp:10240
[ OK ] ./bin/dpip ipset test foo 192.168.100.111,tcp:10240 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.101.111,tcp:10240 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.101.111,tcp:10241 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.102.111,tcp:10241 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.102.30,tcp:10240 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.102.30,10240 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.102.31,tcp:10240 EXPECT false
[ OK ] ./bin/dpip ipset add foo 192.168.100.101/25,tcp:10240 nomatch comment bad-guys
[ OK ] ./bin/dpip ipset test foo 192.168.100.111,tcp:10240 EXPECT false
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset add foo 10.128.34.211-10.128.37.189,3000-3001
[ OK ] ./bin/dpip ipset test foo 10.128.35.141,3001 EXPECT true
[ OK ] ./bin/dpip ipset add foo 10.128.35.100-10.128.35.150,3000-3001 nomatch
[ OK ] ./bin/dpip ipset test foo 10.128.34.210,3000 EXPECT false
[ OK ] ./bin/dpip ipset test foo 10.128.34.211,3000 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.128.37.185,3001 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.128.37.190,3001 EXPECT false
[ OK ] ./bin/dpip ipset test foo 10.128.35.141,3001 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:net,port maxelem 1024
[ OK ] ./bin/dpip ipset add bar 2001::/64,tcp:80-88
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,tcp:85 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1111:2222:3333:4444,tcp:88 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4,tcp:89 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1:2:3:4:5,tcp:85 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::eeee:aaaa:1:6,tcp:85 EXPECT true
[ OK ] ./bin/dpip ipset add bar 2001::eeee:aaaa:1243:6789/96,tcp:84-86 nomatch
[ OK ] ./bin/dpip ipset test bar 2001::eeee:aaaa:1:6,tcp:85 EXPECT false
[ OK ] ./bin/dpip ipset destroy bar
hash:net,port,net
[ OK ] ./bin/dpip ipset create foo hash:net,port,net
[ OK ] ./bin/dpip ipset add foo 192.168.188.20-192.168.190.36,2021-2022,192.168.33.223-192.168.34.123
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset add foo 10.60.0.0/16,tcp:10240-10242,10.130.0.0/16
[ OK ] ./bin/dpip ipset test foo 10.60.12.34,tcp:10241,10.130.56.78 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.60.0.0,tcp:10242,10.130.255.255 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.61.0.0,tcp:10240,10.130.255.255 EXPECT false
[ OK ] ./bin/dpip ipset test foo 10.60.0.0,udp:10240,10.130.255.255 EXPECT false
[ OK ] ./bin/dpip ipset test foo 10.60.100.168,tcp:10242,10.130.100.192 EXPECT true
[ OK ] ./bin/dpip ipset add foo 10.60.100.100-10.60.100.200,tcp:10242,10.130.100.100-10.130.100.200 nomatch
[ OK ] ./bin/dpip ipset test foo 10.60.100.168,tcp:10242,10.130.100.192 EXPECT false
[ OK ] ./bin/dpip ipset test foo 10.60.100.168,tcp:10241,10.130.100.192 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.60.100.201,tcp:10242,10.130.100.192 EXPECT true
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:net,port,net hashsize 1024 maxelem 4096 comment
[ OK ] ./bin/dpip ipset add bar 210e:36a9::aa:bbbb/96,udp:8080-8082,2408:a91e::cc:dddd/96 comment test-entries
[ OK ] ./bin/dpip ipset test bar 210e:36a9::12:3456,udp:8080,2408:a91e::78:9abc EXPECT true
[ OK ] ./bin/dpip ipset test bar 210e:36a9::ff:ffff,udp:8080,2408:a91e:: EXPECT true
[ OK ] ./bin/dpip ipset test bar 210e:36a9::,udp:8082,2408:a91e::ff:ffff EXPECT true
[ OK ] ./bin/dpip ipset add bar 210e:36a9::12:3456/102,udp:8080,2408:a91e::78:9abc/102 nomatch
[ OK ] ./bin/dpip ipset test bar 210e:36a9::12:3456,udp:8080,2408:a91e::78:9abc EXPECT false
[ OK ] ./bin/dpip ipset del bar 210e:36a9::12:3456/102,udp:8080,2408:a91e::78:9abc/102
[ OK ] ./bin/dpip ipset test bar 210e:36a9::ff:ffff,udp:8080,2408:a91e:: EXPECT true
[ OK ] ./bin/dpip ipset test bar 210e:36a9::12:3456,udp:8080,2408:a91e::78:9abc EXPECT true
[ OK ] ./bin/dpip ipset destroy bar
hash:ip,port,net
[ OK ] ./bin/dpip ipset create foo hash:ip,port,net comment
[ OK ] ./bin/dpip ipset add foo 192.168.12.1/24,tcp:8080,192.168.100.0/24
[ OK ] ./bin/dpip ipset test foo 192.168.12.211,tcp:8080,192.168.100.211 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.12.0,tcp:8080,192.168.100.255 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.12.211,tcp:8080,192.168.101.0 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.13.0,tcp:8080,192.168.100.211 EXPECT false
[ OK ] ./bin/dpip ipset test foo 192.168.12.211,8080,192.168.100.211 EXPECT false
[ OK ] ./bin/dpip ipset add foo 192.168.12.200-192.168.12.255,tcp:8080,192.168.100.200-192.168.100.255 nomatch
[ OK ] ./bin/dpip ipset list -v
[ OK ] ./bin/dpip ipset test foo 192.168.12.211,tcp:8080,192.168.100.111 EXPECT true
[ OK ] ./bin/dpip ipset test foo 192.168.12.211,tcp:8080,192.168.100.211 EXPECT false
[ OK ] ./bin/dpip ipset add foo 192.168.12.211,tcp:8080,192.168.100.211/32 comment I'm-innocent
[ OK ] ./bin/dpip ipset test foo 192.168.12.211,tcp:8080,192.168.100.211 EXPECT true
[ OK ] ./bin/dpip ipset del foo 192.168.12.200-192.168.12.255,tcp:8080,192.168.100.200-192.168.100.255
[ OK ] ./bin/dpip ipset flush foo
[ OK ] ./bin/dpip ipset add foo 10.61.240.1-10.61.240.9,udp:10240-10242,10.110.123.102/21
[ OK ] ./bin/dpip ipset test foo 10.61.240.3,udp:10240,10.110.123.123 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.61.240.6,udp:10241,10.110.120.1 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.61.240.9,udp:10242,10.110.127.255 EXPECT true
[ OK ] ./bin/dpip ipset test foo 10.61.240.3,udp:10243,10.110.123.123 EXPECT false
[ OK ] ./bin/dpip ipset destroy foo
[ OK ] ./bin/dpip ipset -6 create bar hash:ip,port,net
[ OK ] ./bin/dpip ipset add bar 2001::1,8080-8082,2002::/64
[ OK ] ./bin/dpip ipset add bar 2001::2,8080-8082,2002::/64
[ OK ] ./bin/dpip ipset add bar 2001::3,8080-8082,2002::/64
[ OK ] ./bin/dpip ipset add bar 2001::1,8080-8082,2002::aaaa:bbbb:ccc1:2222/108 nomatch
[ OK ] ./bin/dpip ipset test bar 2001::1,8081,2002::1:2:3:4 EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1,8081,2002::1:2:3:4:5 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::2,8080,2002:: EXPECT true
[ OK ] ./bin/dpip ipset test bar 2001::1,8081,2002::aaaa:bbbb:ccc1:2345 EXPECT false
[ OK ] ./bin/dpip ipset test bar 2001::1,8081,2002::aaaa:bbbb:cc11:2345 EXPECT true
[ OK ] ./bin/dpip ipset destroy bar
IPSET TEST RESULT: PASS