Lines Matching refs:info

56 	const struct xt_set_info_match_v0 *info = par->matchinfo;
58 ADT_OPT(opt, xt_family(par), info->match_set.u.compat.dim,
59 info->match_set.u.compat.flags, 0, UINT_MAX,
62 return match_set(info->match_set.index, skb, par, &opt,
63 info->match_set.u.compat.flags & IPSET_INV_MATCH);
67 compat_flags(struct xt_set_info_v0 *info)
72 info->u.compat.dim = IPSET_DIM_ZERO;
73 if (info->u.flags[0] & IPSET_MATCH_INV)
74 info->u.compat.flags |= IPSET_INV_MATCH;
75 for (i = 0; i < IPSET_DIM_MAX - 1 && info->u.flags[i]; i++) {
76 info->u.compat.dim++;
77 if (info->u.flags[i] & IPSET_SRC)
78 info->u.compat.flags |= (1 << info->u.compat.dim);
85 struct xt_set_info_match_v0 *info = par->matchinfo;
88 index = ip_set_nfnl_get_byindex(par->net, info->match_set.index);
92 info->match_set.index);
95 if (info->match_set.u.flags[IPSET_DIM_MAX - 1] != 0) {
97 ip_set_nfnl_put(par->net, info->match_set.index);
102 compat_flags(&info->match_set);
110 struct xt_set_info_match_v0 *info = par->matchinfo;
112 ip_set_nfnl_put(par->net, info->match_set.index);
120 const struct xt_set_info_match_v1 *info = par->matchinfo;
122 ADT_OPT(opt, xt_family(par), info->match_set.dim,
123 info->match_set.flags, 0, UINT_MAX,
129 return match_set(info->match_set.index, skb, par, &opt,
130 info->match_set.flags & IPSET_INV_MATCH);
136 struct xt_set_info_match_v1 *info = par->matchinfo;
139 index = ip_set_nfnl_get_byindex(par->net, info->match_set.index);
143 info->match_set.index);
146 if (info->match_set.dim > IPSET_DIM_MAX) {
148 ip_set_nfnl_put(par->net, info->match_set.index);
158 struct xt_set_info_match_v1 *info = par->matchinfo;
160 ip_set_nfnl_put(par->net, info->match_set.index);
168 const struct xt_set_info_match_v3 *info = par->matchinfo;
170 ADT_OPT(opt, xt_family(par), info->match_set.dim,
171 info->match_set.flags, info->flags, UINT_MAX,
172 info->packets.value, info->bytes.value,
173 info->packets.op, info->bytes.op);
175 if (info->packets.op != IPSET_COUNTER_NONE ||
176 info->bytes.op != IPSET_COUNTER_NONE)
179 return match_set(info->match_set.index, skb, par, &opt,
180 info->match_set.flags & IPSET_INV_MATCH);
191 const struct xt_set_info_match_v4 *info = par->matchinfo;
193 ADT_OPT(opt, xt_family(par), info->match_set.dim,
194 info->match_set.flags, info->flags, UINT_MAX,
195 info->packets.value, info->bytes.value,
196 info->packets.op, info->bytes.op);
198 if (info->packets.op != IPSET_COUNTER_NONE ||
199 info->bytes.op != IPSET_COUNTER_NONE)
202 return match_set(info->match_set.index, skb, par, &opt,
203 info->match_set.flags & IPSET_INV_MATCH);
214 const struct xt_set_info_target_v0 *info = par->targinfo;
216 ADT_OPT(add_opt, xt_family(par), info->add_set.u.compat.dim,
217 info->add_set.u.compat.flags, 0, UINT_MAX,
219 ADT_OPT(del_opt, xt_family(par), info->del_set.u.compat.dim,
220 info->del_set.u.compat.flags, 0, UINT_MAX,
223 if (info->add_set.index != IPSET_INVALID_ID)
224 ip_set_add(info->add_set.index, skb, par, &add_opt);
225 if (info->del_set.index != IPSET_INVALID_ID)
226 ip_set_del(info->del_set.index, skb, par, &del_opt);
234 struct xt_set_info_target_v0 *info = par->targinfo;
237 if (info->add_set.index != IPSET_INVALID_ID) {
238 index = ip_set_nfnl_get_byindex(par->net, info->add_set.index);
241 info->add_set.index);
246 if (info->del_set.index != IPSET_INVALID_ID) {
247 index = ip_set_nfnl_get_byindex(par->net, info->del_set.index);
250 info->del_set.index);
251 if (info->add_set.index != IPSET_INVALID_ID)
252 ip_set_nfnl_put(par->net, info->add_set.index);
256 if (info->add_set.u.flags[IPSET_DIM_MAX - 1] != 0 ||
257 info->del_set.u.flags[IPSET_DIM_MAX - 1] != 0) {
259 if (info->add_set.index != IPSET_INVALID_ID)
260 ip_set_nfnl_put(par->net, info->add_set.index);
261 if (info->del_set.index != IPSET_INVALID_ID)
262 ip_set_nfnl_put(par->net, info->del_set.index);
267 compat_flags(&info->add_set);
268 compat_flags(&info->del_set);
276 const struct xt_set_info_target_v0 *info = par->targinfo;
278 if (info->add_set.index != IPSET_INVALID_ID)
279 ip_set_nfnl_put(par->net, info->add_set.index);
280 if (info->del_set.index != IPSET_INVALID_ID)
281 ip_set_nfnl_put(par->net, info->del_set.index);
289 const struct xt_set_info_target_v1 *info = par->targinfo;
291 ADT_OPT(add_opt, xt_family(par), info->add_set.dim,
292 info->add_set.flags, 0, UINT_MAX,
294 ADT_OPT(del_opt, xt_family(par), info->del_set.dim,
295 info->del_set.flags, 0, UINT_MAX,
298 if (info->add_set.index != IPSET_INVALID_ID)
299 ip_set_add(info->add_set.index, skb, par, &add_opt);
300 if (info->del_set.index != IPSET_INVALID_ID)
301 ip_set_del(info->del_set.index, skb, par, &del_opt);
309 const struct xt_set_info_target_v1 *info = par->targinfo;
312 if (info->add_set.index != IPSET_INVALID_ID) {
313 index = ip_set_nfnl_get_byindex(par->net, info->add_set.index);
316 info->add_set.index);
321 if (info->del_set.index != IPSET_INVALID_ID) {
322 index = ip_set_nfnl_get_byindex(par->net, info->del_set.index);
325 info->del_set.index);
326 if (info->add_set.index != IPSET_INVALID_ID)
327 ip_set_nfnl_put(par->net, info->add_set.index);
331 if (info->add_set.dim > IPSET_DIM_MAX ||
332 info->del_set.dim > IPSET_DIM_MAX) {
334 if (info->add_set.index != IPSET_INVALID_ID)
335 ip_set_nfnl_put(par->net, info->add_set.index);
336 if (info->del_set.index != IPSET_INVALID_ID)
337 ip_set_nfnl_put(par->net, info->del_set.index);
347 const struct xt_set_info_target_v1 *info = par->targinfo;
349 if (info->add_set.index != IPSET_INVALID_ID)
350 ip_set_nfnl_put(par->net, info->add_set.index);
351 if (info->del_set.index != IPSET_INVALID_ID)
352 ip_set_nfnl_put(par->net, info->del_set.index);
360 const struct xt_set_info_target_v2 *info = par->targinfo;
362 ADT_OPT(add_opt, xt_family(par), info->add_set.dim,
363 info->add_set.flags, info->flags, info->timeout,
365 ADT_OPT(del_opt, xt_family(par), info->del_set.dim,
366 info->del_set.flags, 0, UINT_MAX,
373 if (info->add_set.index != IPSET_INVALID_ID)
374 ip_set_add(info->add_set.index, skb, par, &add_opt);
375 if (info->del_set.index != IPSET_INVALID_ID)
376 ip_set_del(info->del_set.index, skb, par, &del_opt);
391 const struct xt_set_info_target_v3 *info = par->targinfo;
394 ADT_OPT(add_opt, xt_family(par), info->add_set.dim,
395 info->add_set.flags, info->flags, info->timeout,
397 ADT_OPT(del_opt, xt_family(par), info->del_set.dim,
398 info->del_set.flags, 0, UINT_MAX,
400 ADT_OPT(map_opt, xt_family(par), info->map_set.dim,
401 info->map_set.flags, 0, UINT_MAX,
408 if (info->add_set.index != IPSET_INVALID_ID)
409 ip_set_add(info->add_set.index, skb, par, &add_opt);
410 if (info->del_set.index != IPSET_INVALID_ID)
411 ip_set_del(info->del_set.index, skb, par, &del_opt);
412 if (info->map_set.index != IPSET_INVALID_ID) {
413 map_opt.cmdflags |= info->flags & (IPSET_FLAG_MAP_SKBMARK |
416 ret = match_set(info->map_set.index, skb, par, &map_opt,
417 info->map_set.flags & IPSET_INV_MATCH);
436 const struct xt_set_info_target_v3 *info = par->targinfo;
440 if (info->add_set.index != IPSET_INVALID_ID) {
442 info->add_set.index);
445 info->add_set.index);
450 if (info->del_set.index != IPSET_INVALID_ID) {
452 info->del_set.index);
455 info->del_set.index);
461 if (info->map_set.index != IPSET_INVALID_ID) {
467 if (((info->flags & IPSET_FLAG_MAP_SKBPRIO) |
468 (info->flags & IPSET_FLAG_MAP_SKBQUEUE)) &&
477 info->map_set.index);
480 info->map_set.index);
486 if (info->add_set.dim > IPSET_DIM_MAX ||
487 info->del_set.dim > IPSET_DIM_MAX ||
488 info->map_set.dim > IPSET_DIM_MAX) {
496 if (info->map_set.index != IPSET_INVALID_ID)
497 ip_set_nfnl_put(par->net, info->map_set.index);
499 if (info->del_set.index != IPSET_INVALID_ID)
500 ip_set_nfnl_put(par->net, info->del_set.index);
502 if (info->add_set.index != IPSET_INVALID_ID)
503 ip_set_nfnl_put(par->net, info->add_set.index);
510 const struct xt_set_info_target_v3 *info = par->targinfo;
512 if (info->add_set.index != IPSET_INVALID_ID)
513 ip_set_nfnl_put(par->net, info->add_set.index);
514 if (info->del_set.index != IPSET_INVALID_ID)
515 ip_set_nfnl_put(par->net, info->del_set.index);
516 if (info->map_set.index != IPSET_INVALID_ID)
517 ip_set_nfnl_put(par->net, info->map_set.index);