Commit 7dd37bc8e605d3ce14e6a1bc88ebbfae7ef43b9f
Committed by
Jozsef Kadlecsik
1 parent
edda079174
netfilter: ipset: Check extensions attributes before getting extensions.
Make all extensions attributes checks within ip_set_get_extensions() and reduce number of duplicated code. Signed-off-by: Sergey Popovich <popovich_sergei@mail.ua> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Showing 16 changed files with 29 additions and 170 deletions Side-by-side Diff
- net/netfilter/ipset/ip_set_bitmap_ip.c
- net/netfilter/ipset/ip_set_bitmap_ipmac.c
- net/netfilter/ipset/ip_set_bitmap_port.c
- net/netfilter/ipset/ip_set_core.c
- net/netfilter/ipset/ip_set_hash_ip.c
- net/netfilter/ipset/ip_set_hash_ipmark.c
- net/netfilter/ipset/ip_set_hash_ipport.c
- net/netfilter/ipset/ip_set_hash_ipportip.c
- net/netfilter/ipset/ip_set_hash_ipportnet.c
- net/netfilter/ipset/ip_set_hash_mac.c
- net/netfilter/ipset/ip_set_hash_net.c
- net/netfilter/ipset/ip_set_hash_netiface.c
- net/netfilter/ipset/ip_set_hash_netnet.c
- net/netfilter/ipset/ip_set_hash_netport.c
- net/netfilter/ipset/ip_set_hash_netportnet.c
- net/netfilter/ipset/ip_set_list_set.c
net/netfilter/ipset/ip_set_bitmap_ip.c
... | ... | @@ -138,13 +138,7 @@ |
138 | 138 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
139 | 139 | int ret = 0; |
140 | 140 | |
141 | - if (unlikely(!tb[IPSET_ATTR_IP] || | |
142 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
143 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
144 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
145 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
146 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
147 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
141 | + if (unlikely(!tb[IPSET_ATTR_IP])) | |
148 | 142 | return -IPSET_ERR_PROTOCOL; |
149 | 143 | |
150 | 144 | if (tb[IPSET_ATTR_LINENO]) |
net/netfilter/ipset/ip_set_bitmap_ipmac.c
... | ... | @@ -239,13 +239,7 @@ |
239 | 239 | u32 ip = 0; |
240 | 240 | int ret = 0; |
241 | 241 | |
242 | - if (unlikely(!tb[IPSET_ATTR_IP] || | |
243 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
244 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
245 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
246 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
247 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
248 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
242 | + if (unlikely(!tb[IPSET_ATTR_IP])) | |
249 | 243 | return -IPSET_ERR_PROTOCOL; |
250 | 244 | |
251 | 245 | if (tb[IPSET_ATTR_LINENO]) |
net/netfilter/ipset/ip_set_bitmap_port.c
... | ... | @@ -137,13 +137,7 @@ |
137 | 137 | int ret = 0; |
138 | 138 | |
139 | 139 | if (unlikely(!ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
140 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || | |
141 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
142 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
143 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
144 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
145 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
146 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
140 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) | |
147 | 141 | return -IPSET_ERR_PROTOCOL; |
148 | 142 | |
149 | 143 | if (tb[IPSET_ATTR_LINENO]) |
net/netfilter/ipset/ip_set_core.c
... | ... | @@ -389,6 +389,15 @@ |
389 | 389 | struct ip_set_ext *ext) |
390 | 390 | { |
391 | 391 | u64 fullmark; |
392 | + | |
393 | + if (unlikely(!ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
394 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
395 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
396 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
397 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
398 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
399 | + return -IPSET_ERR_PROTOCOL; | |
400 | + | |
392 | 401 | if (tb[IPSET_ATTR_TIMEOUT]) { |
393 | 402 | if (!SET_WITH_TIMEOUT(set)) |
394 | 403 | return -IPSET_ERR_TIMEOUT; |
net/netfilter/ipset/ip_set_hash_ip.c
... | ... | @@ -108,13 +108,7 @@ |
108 | 108 | u32 ip = 0, ip_to = 0, hosts; |
109 | 109 | int ret = 0; |
110 | 110 | |
111 | - if (unlikely(!tb[IPSET_ATTR_IP] || | |
112 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
113 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
114 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
115 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
116 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
117 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
111 | + if (unlikely(!tb[IPSET_ATTR_IP])) | |
118 | 112 | return -IPSET_ERR_PROTOCOL; |
119 | 113 | |
120 | 114 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -247,12 +241,6 @@ |
247 | 241 | int ret; |
248 | 242 | |
249 | 243 | if (unlikely(!tb[IPSET_ATTR_IP] || |
250 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
251 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
252 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
253 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
254 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
255 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || | |
256 | 244 | tb[IPSET_ATTR_IP_TO] || |
257 | 245 | tb[IPSET_ATTR_CIDR])) |
258 | 246 | return -IPSET_ERR_PROTOCOL; |
net/netfilter/ipset/ip_set_hash_ipmark.c
... | ... | @@ -109,13 +109,7 @@ |
109 | 109 | int ret; |
110 | 110 | |
111 | 111 | if (unlikely(!tb[IPSET_ATTR_IP] || |
112 | - !ip_set_attr_netorder(tb, IPSET_ATTR_MARK) || | |
113 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
114 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
115 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
116 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
117 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
118 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
112 | + !ip_set_attr_netorder(tb, IPSET_ATTR_MARK))) | |
119 | 113 | return -IPSET_ERR_PROTOCOL; |
120 | 114 | |
121 | 115 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -242,12 +236,6 @@ |
242 | 236 | |
243 | 237 | if (unlikely(!tb[IPSET_ATTR_IP] || |
244 | 238 | !ip_set_attr_netorder(tb, IPSET_ATTR_MARK) || |
245 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
246 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
247 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
248 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
249 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
250 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || | |
251 | 239 | tb[IPSET_ATTR_IP_TO] || |
252 | 240 | tb[IPSET_ATTR_CIDR])) |
253 | 241 | return -IPSET_ERR_PROTOCOL; |
net/netfilter/ipset/ip_set_hash_ipport.c
... | ... | @@ -118,13 +118,7 @@ |
118 | 118 | |
119 | 119 | if (unlikely(!tb[IPSET_ATTR_IP] || |
120 | 120 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
121 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || | |
122 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
123 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
124 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
125 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
126 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
127 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
121 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) | |
128 | 122 | return -IPSET_ERR_PROTOCOL; |
129 | 123 | |
130 | 124 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -282,12 +276,6 @@ |
282 | 276 | if (unlikely(!tb[IPSET_ATTR_IP] || |
283 | 277 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
284 | 278 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
285 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
286 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
287 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
288 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
289 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
290 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || | |
291 | 279 | tb[IPSET_ATTR_IP_TO] || |
292 | 280 | tb[IPSET_ATTR_CIDR])) |
293 | 281 | return -IPSET_ERR_PROTOCOL; |
net/netfilter/ipset/ip_set_hash_ipportip.c
... | ... | @@ -121,13 +121,7 @@ |
121 | 121 | |
122 | 122 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
123 | 123 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
124 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || | |
125 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
126 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
127 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
128 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
129 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
130 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
124 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) | |
131 | 125 | return -IPSET_ERR_PROTOCOL; |
132 | 126 | |
133 | 127 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -293,12 +287,6 @@ |
293 | 287 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
294 | 288 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
295 | 289 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
296 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
297 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
298 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
299 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
300 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
301 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || | |
302 | 290 | tb[IPSET_ATTR_IP_TO] || |
303 | 291 | tb[IPSET_ATTR_CIDR])) |
304 | 292 | return -IPSET_ERR_PROTOCOL; |
net/netfilter/ipset/ip_set_hash_ipportnet.c
... | ... | @@ -176,13 +176,7 @@ |
176 | 176 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
177 | 177 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
178 | 178 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
179 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
180 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
181 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
182 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
183 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
184 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
185 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
179 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
186 | 180 | return -IPSET_ERR_PROTOCOL; |
187 | 181 | |
188 | 182 | if (tb[IPSET_ATTR_LINENO]) |
189 | 183 | |
... | ... | @@ -429,13 +423,7 @@ |
429 | 423 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
430 | 424 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
431 | 425 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
432 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
433 | 426 | !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || |
434 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
435 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
436 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
437 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
438 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE) || | |
439 | 427 | tb[IPSET_ATTR_IP_TO] || |
440 | 428 | tb[IPSET_ATTR_CIDR])) |
441 | 429 | return -IPSET_ERR_PROTOCOL; |
net/netfilter/ipset/ip_set_hash_mac.c
... | ... | @@ -107,13 +107,7 @@ |
107 | 107 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
108 | 108 | int ret; |
109 | 109 | |
110 | - if (unlikely(!tb[IPSET_ATTR_ETHER] || | |
111 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
112 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
113 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
114 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
115 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
116 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
110 | + if (unlikely(!tb[IPSET_ATTR_ETHER])) | |
117 | 111 | return -IPSET_ERR_PROTOCOL; |
118 | 112 | |
119 | 113 | if (tb[IPSET_ATTR_LINENO]) |
net/netfilter/ipset/ip_set_hash_net.c
... | ... | @@ -147,13 +147,7 @@ |
147 | 147 | int ret; |
148 | 148 | |
149 | 149 | if (unlikely(!tb[IPSET_ATTR_IP] || |
150 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
151 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
152 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
153 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
154 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
155 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
156 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
150 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
157 | 151 | return -IPSET_ERR_PROTOCOL; |
158 | 152 | |
159 | 153 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -319,13 +313,7 @@ |
319 | 313 | int ret; |
320 | 314 | |
321 | 315 | if (unlikely(!tb[IPSET_ATTR_IP] || |
322 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
323 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
324 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
325 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
326 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
327 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
328 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
316 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
329 | 317 | return -IPSET_ERR_PROTOCOL; |
330 | 318 | if (unlikely(tb[IPSET_ATTR_IP_TO])) |
331 | 319 | return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; |
net/netfilter/ipset/ip_set_hash_netiface.c
... | ... | @@ -295,13 +295,7 @@ |
295 | 295 | |
296 | 296 | if (unlikely(!tb[IPSET_ATTR_IP] || |
297 | 297 | !tb[IPSET_ATTR_IFACE] || |
298 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
299 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
300 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
301 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
302 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
303 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
304 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
298 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
305 | 299 | return -IPSET_ERR_PROTOCOL; |
306 | 300 | |
307 | 301 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -531,13 +525,7 @@ |
531 | 525 | |
532 | 526 | if (unlikely(!tb[IPSET_ATTR_IP] || |
533 | 527 | !tb[IPSET_ATTR_IFACE] || |
534 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
535 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
536 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
537 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
538 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
539 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
540 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
528 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
541 | 529 | return -IPSET_ERR_PROTOCOL; |
542 | 530 | if (unlikely(tb[IPSET_ATTR_IP_TO])) |
543 | 531 | return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; |
net/netfilter/ipset/ip_set_hash_netnet.c
... | ... | @@ -169,13 +169,7 @@ |
169 | 169 | |
170 | 170 | e.cidr[0] = e.cidr[1] = HOST_MASK; |
171 | 171 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
172 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
173 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
174 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
175 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
176 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
177 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
178 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
172 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
179 | 173 | return -IPSET_ERR_PROTOCOL; |
180 | 174 | |
181 | 175 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -400,13 +394,7 @@ |
400 | 394 | |
401 | 395 | e.cidr[0] = e.cidr[1] = HOST_MASK; |
402 | 396 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
403 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
404 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
405 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
406 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
407 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
408 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
409 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
397 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
410 | 398 | return -IPSET_ERR_PROTOCOL; |
411 | 399 | if (unlikely(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_IP2_TO])) |
412 | 400 | return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; |
net/netfilter/ipset/ip_set_hash_netport.c
... | ... | @@ -169,13 +169,7 @@ |
169 | 169 | if (unlikely(!tb[IPSET_ATTR_IP] || |
170 | 170 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
171 | 171 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
172 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
173 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
174 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
175 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
176 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
177 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
178 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
172 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
179 | 173 | return -IPSET_ERR_PROTOCOL; |
180 | 174 | |
181 | 175 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -387,13 +381,7 @@ |
387 | 381 | if (unlikely(!tb[IPSET_ATTR_IP] || |
388 | 382 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
389 | 383 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
390 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
391 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
392 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
393 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
394 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
395 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
396 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
384 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
397 | 385 | return -IPSET_ERR_PROTOCOL; |
398 | 386 | if (unlikely(tb[IPSET_ATTR_IP_TO])) |
399 | 387 | return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; |
net/netfilter/ipset/ip_set_hash_netportnet.c
... | ... | @@ -187,13 +187,7 @@ |
187 | 187 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
188 | 188 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
189 | 189 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
190 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
191 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
192 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
193 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
194 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
195 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
196 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
190 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
197 | 191 | return -IPSET_ERR_PROTOCOL; |
198 | 192 | |
199 | 193 | if (tb[IPSET_ATTR_LINENO]) |
... | ... | @@ -463,13 +457,7 @@ |
463 | 457 | if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || |
464 | 458 | !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || |
465 | 459 | !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || |
466 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
467 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
468 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
469 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
470 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
471 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
472 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
460 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
473 | 461 | return -IPSET_ERR_PROTOCOL; |
474 | 462 | if (unlikely(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_IP2_TO])) |
475 | 463 | return -IPSET_ERR_HASH_RANGE_UNSUPPORTED; |
net/netfilter/ipset/ip_set_list_set.c
... | ... | @@ -384,13 +384,7 @@ |
384 | 384 | int ret = 0; |
385 | 385 | |
386 | 386 | if (unlikely(!tb[IPSET_ATTR_NAME] || |
387 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || | |
388 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || | |
389 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || | |
390 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || | |
391 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || | |
392 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || | |
393 | - !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) | |
387 | + !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS))) | |
394 | 388 | return -IPSET_ERR_PROTOCOL; |
395 | 389 | |
396 | 390 | if (tb[IPSET_ATTR_LINENO]) |