| /net/netfilter/ipset/ |
| A D | ip_set_bitmap_gen.h | 55 ip_set_ext_destroy(set, get_ext(set, map, id)); in mtype_ext_cleanup() 63 if (set->dsize && set->extensions & IPSET_EXT_DESTROY) in mtype_destroy() 68 set->data = NULL; in mtype_destroy() 79 set->elements = 0; in mtype_flush() 80 set->ext_size = 0; in mtype_flush() 96 size_t memsize = mtype_memsize(map, set->dsize) + set->ext_size; in mtype_head() 155 mtype_add_timeout(ext_timeout(x, set), e, ext, set, map, ret); in mtype_add() 163 ip_set_init_comment(set, ext_comment(x, set), ext); in mtype_add() 169 set->elements++; in mtype_add() 186 set->elements--; in mtype_del() [all …]
|
| A D | ip_set_list_set.c | 146 struct ip_set *set = e->set; in __list_set_del_rcu() local 157 set->elements--; in list_set_del() 227 ip_set_init_comment(set, ext_comment(e, set), ext); in list_set_init_extensions() 301 e->set = set; in list_set_uadd() 312 set->elements++; in list_set_uadd() 435 set->data = NULL; in list_set_destroy() 458 size_t memsize = list_set_memsize(map, set->dsize) + set->ext_size; in list_set_head() 575 struct ip_set *set = map->set; in list_set_gc() local 607 map->set = set; in init_list_set() 609 set->data = map; in init_list_set() [all …]
|
| A D | ip_set_core.c | 1163 set->variant->cancel_gc(set); in ip_set_create() 1164 set->variant->destroy(set); in ip_set_create() 1192 set->variant->destroy(set); in ip_set_destroy_set_rcu() 1208 set->variant->cancel_gc(set); in _destroy_all_sets() 1220 set->variant->destroy(set); in _destroy_all_sets() 1302 set->variant->flush(set); in ip_set_flush_set() 1486 set->variant->uref(set, cb, false); in ip_set_dump_done() 1651 ret = set->variant->head(set, skb); in ip_set_dump_do() 1657 set->variant->uref(set, cb, true); in ip_set_dump_do() 1672 if (set && set->variant->uref) in ip_set_dump_do() [all …]
|
| A D | ip_set_hash_gen.h | 392 ip_set_ext_destroy(set, ahash_data(n, i, set->dsize)); in mtype_ext_cleanup() 462 set->data = NULL; in mtype_destroy() 567 set = gc->set; in mtype_gc() 568 h = set->data; in mtype_gc() 981 ip_set_init_comment(set, ext_comment(data, set), ext); in mtype_add() 1416 set->name); in mtype_list() 1477 set->name, set->family == NFPROTO_IPV4 ? "inet" : "inet6"); in IPSET_TOKEN() 1579 h->gc.set = set; in IPSET_TOKEN() 1609 set->data = h; in IPSET_TOKEN() 1614 set->dsize = ip_set_elem_len(set, tb, in IPSET_TOKEN() [all …]
|
| A D | Kconfig | 3 tristate "IP set support" 29 tristate "bitmap:ip set support" 38 tristate "bitmap:ip,mac set support" 47 tristate "bitmap:port set support" 56 tristate "hash:ip set support" 61 in a set. 89 address triples in a set. 113 tristate "hash:mac set support" 131 tristate "hash:net set support" 169 tristate "list:set set support" [all …]
|
| A D | ip_set_bitmap_port.c | 131 struct bitmap_port *map = set->data; in bitmap_port_kadt() 132 ipset_adtfn adtfn = set->variant->adt[adt]; in bitmap_port_kadt() 156 struct bitmap_port *map = set->data; in bitmap_port_uadt() 180 return adtfn(set, &e, &ext, &ext, flags); in bitmap_port_uadt() 199 ret = adtfn(set, &e, &ext, &ext, flags); in bitmap_port_uadt() 239 set->timeout = IPSET_NO_TIMEOUT; in init_map_port() 241 map->set = set; in init_map_port() 242 set->data = map; in init_map_port() 243 set->family = NFPROTO_UNSPEC; in init_map_port() 268 set->dsize = ip_set_elem_len(set, tb, 0, 0); in bitmap_port_create() [all …]
|
| A D | ip_set_hash_ipmark.c | 84 const struct hash_ipmark4 *h = set->data; in hash_ipmark4_kadt() 85 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipmark4_kadt() 100 struct hash_ipmark4 *h = set->data; in hash_ipmark4_uadt() 101 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipmark4_uadt() 118 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipmark4_uadt() 129 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipmark4_uadt() 159 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipmark4_uadt() 219 const struct hash_ipmark6 *h = set->data; in hash_ipmark6_kadt() 235 const struct hash_ipmark6 *h = set->data; in hash_ipmark6_uadt() 268 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipmark6_uadt() [all …]
|
| A D | ip_set_bitmap_ip.c | 114 struct bitmap_ip *map = set->data; in bitmap_ip_kadt() 133 struct bitmap_ip *map = set->data; in bitmap_ip_uadt() 159 return adtfn(set, &e, &ext, &ext, flags); in bitmap_ip_uadt() 183 ret = adtfn(set, &e, &ext, &ext, flags); in bitmap_ip_uadt() 228 set->timeout = IPSET_NO_TIMEOUT; in init_map_ip() 230 map->set = set; in init_map_ip() 231 set->data = map; in init_map_ip() 232 set->family = NFPROTO_IPV4; in init_map_ip() 317 set->dsize = ip_set_elem_len(set, tb, 0, 0); in bitmap_ip_create() 323 set->variant = &bitmap_ip; in bitmap_ip_create() [all …]
|
| A D | ip_set_bitmap_ipmac.c | 124 if (t == set->timeout) in bitmap_ipmac_add_timeout() 212 struct bitmap_ipmac *map = set->data; in bitmap_ipmac_kadt() 213 ipset_adtfn adtfn = set->variant->adt[adt]; in bitmap_ipmac_kadt() 244 const struct bitmap_ipmac *map = set->data; in bitmap_ipmac_uadt() 275 ret = adtfn(set, &e, &ext, &ext, flags); in bitmap_ipmac_uadt() 308 set->timeout = IPSET_NO_TIMEOUT; in init_map_ipmac() 310 map->set = set; in init_map_ipmac() 311 set->data = map; in init_map_ipmac() 312 set->family = NFPROTO_IPV4; in init_map_ipmac() 356 set->dsize = ip_set_elem_len(set, tb, in bitmap_ipmac_create() [all …]
|
| A D | ip_set_hash_ip.c | 84 const struct hash_ip4 *h = set->data; in hash_ip4_kadt() 85 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ip4_kadt() 103 struct hash_ip4 *h = set->data; in hash_ip4_uadt() 104 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ip4_uadt() 120 ret = ip_set_get_extensions(set, tb, &ext); in hash_ip4_uadt() 130 return adtfn(set, &e, &ext, &ext, flags); in hash_ip4_uadt() 160 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ip4_uadt() 220 const struct hash_ip6 *h = set->data; in hash_ip6_kadt() 221 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ip6_kadt() 237 const struct hash_ip6 *h = set->data; in hash_ip6_uadt() [all …]
|
| A D | ip_set_hash_net.c | 117 const struct hash_net4 *h = set->data; in hash_net4_kadt() 118 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_net4_kadt() 139 struct hash_net4 *h = set->data; in hash_net4_uadt() 140 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_net4_uadt() 157 ret = ip_set_get_extensions(set, tb, &ext); in hash_net4_uadt() 176 ret = adtfn(set, &e, &ext, &ext, flags); in hash_net4_uadt() 202 ret = adtfn(set, &e, &ext, &ext, flags); in hash_net4_uadt() 291 const struct hash_net6 *h = set->data; in hash_net6_kadt() 292 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_net6_kadt() 313 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_net6_uadt() [all …]
|
| A D | ip_set_hash_ipport.c | 95 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipport4_kadt() 98 const struct MTYPE *h = set->data; in hash_ipport4_kadt() 115 struct hash_ipport4 *h = set->data; in hash_ipport4_uadt() 116 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipport4_uadt() 135 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipport4_uadt() 161 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipport4_uadt() 199 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipport4_uadt() 268 const struct MTYPE *h = set->data; in hash_ipport6_kadt() 286 const struct hash_ipport6 *h = set->data; in hash_ipport6_uadt() 338 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipport6_uadt() [all …]
|
| A D | ip_set_hash_netport.c | 133 const struct hash_netport4 *h = set->data; in hash_netport4_kadt() 134 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_netport4_kadt() 157 struct hash_netport4 *h = set->data; in hash_netport4_uadt() 158 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_netport4_uadt() 179 ret = ip_set_get_extensions(set, tb, &ext); in hash_netport4_uadt() 216 ret = adtfn(set, &e, &ext, &ext, flags); in hash_netport4_uadt() 255 ret = adtfn(set, &e, &ext, &ext, flags); in hash_netport4_uadt() 353 const struct hash_netport6 *h = set->data; in hash_netport6_kadt() 377 const struct hash_netport6 *h = set->data; in hash_netport6_uadt() 436 ret = adtfn(set, &e, &ext, &ext, flags); in hash_netport6_uadt() [all …]
|
| A D | ip_set_hash_ipmac.c | 88 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipmac4_kadt() 106 return adtfn(set, &e, &ext, &opt->ext, opt->cmdflags); in hash_ipmac4_kadt() 113 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipmac4_uadt() 115 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); in hash_ipmac4_uadt() 133 ip_set_get_extensions(set, tb, &ext); in hash_ipmac4_uadt() 140 return adtfn(set, &e, &ext, &ext, flags); in hash_ipmac4_uadt() 201 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipmac6_kadt() 229 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipmac6_uadt() 234 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); in hash_ipmac6_uadt() 252 ip_set_get_extensions(set, tb, &ext); in hash_ipmac6_uadt() [all …]
|
| A D | ip_set_hash_ipportip.c | 94 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipportip4_kadt() 111 struct hash_ipportip4 *h = set->data; in hash_ipportip4_uadt() 112 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipportip4_uadt() 131 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportip4_uadt() 157 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipportip4_uadt() 195 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipportip4_uadt() 264 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipportip6_kadt() 281 const struct hash_ipportip6 *h = set->data; in hash_ipportip6_uadt() 282 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_ipportip6_uadt() 333 ret = adtfn(set, &e, &ext, &ext, flags); in hash_ipportip6_uadt() [all …]
|
| A D | ip_set_hash_netiface.c | 161 struct hash_netiface4 *h = set->data; in hash_netiface4_kadt() 162 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_netiface4_kadt() 201 struct hash_netiface4 *h = set->data; in hash_netiface4_uadt() 202 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_netiface4_uadt() 220 ret = ip_set_get_extensions(set, tb, &ext); in hash_netiface4_uadt() 243 ret = adtfn(set, &e, &ext, &ext, flags); in hash_netiface4_uadt() 270 ret = adtfn(set, &e, &ext, &ext, flags); in hash_netiface4_uadt() 382 struct hash_netiface6 *h = set->data; in hash_netiface6_kadt() 383 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_netiface6_kadt() 420 ipset_adtfn adtfn = set->variant->adt[adt]; in hash_netiface6_uadt() [all …]
|
| /net/netfilter/ |
| A D | nft_lookup.c | 19 struct nft_set *set; member 54 return set->ops->lookup(net, set, key); in nft_set_do_lookup() 64 const struct nft_set *set = priv->set; in nft_lookup_eval() local 104 struct nft_set *set; in nft_lookup_init() local 114 if (IS_ERR(set)) in nft_lookup_init() 115 return PTR_ERR(set); in nft_lookup_init() 118 set->klen); in nft_lookup_init() 132 if (!(set->flags & NFT_SET_MAP)) in nft_lookup_init() 138 set->dlen); in nft_lookup_init() 159 priv->set = set; in nft_lookup_init() [all …]
|
| A D | nft_dynset.c | 16 struct nft_set *set; member 56 if (!atomic_add_unless(&set->nelems, 1, set->size)) in nft_dynset_new() 76 if (set->size) in nft_dynset_new() 85 struct nft_set *set = priv->set; in nft_dynset_eval() local 90 set->ops->delete(set, ®s->data[priv->sreg_key]); in nft_dynset_eval() 94 ext = set->ops->update(set, ®s->data[priv->sreg_key], expr, regs); in nft_dynset_eval() 137 if (set->exprs[pos] && set->exprs[pos]->ops != expr->ops) { in nft_dynset_expr_alloc() 169 struct nft_set *set; in nft_dynset_init() local 193 if (IS_ERR(set)) in nft_dynset_init() 296 if (set->num_exprs && set->num_exprs != i) { in nft_dynset_init() [all …]
|
| A D | nft_set_hash.c | 38 const struct nft_set *set; member 92 .set = set, in nft_rhash_lookup() 112 .set = set, in nft_rhash_get() 133 .set = set, in nft_rhash_update() 177 .set = set, in nft_rhash_insert() 219 .set = set, in nft_rhash_deactivate() 250 .set = set, in nft_rhash_delete() 318 struct nft_set *set; in nft_rhash_gc() local 461 .set = set, in nft_rhash_destroy() 571 if (set->klen == 4) { in nft_jhash() [all …]
|
| A D | nft_set_rbtree.c | 47 set->klen); in nft_rbtree_cmp() 93 if (nft_set_is_anonymous(set)) in __nft_rbtree_lookup() 152 d = memcmp(this, key, set->klen); in __nft_rbtree_get() 518 const struct nft_set *set, in nft_rbtree_remove() argument 528 const struct nft_set *set, in nft_rbtree_activate() argument 537 const struct nft_set *set, in nft_rbtree_flush() argument 560 set->klen); in nft_rbtree_deactivate() 588 struct nft_set *set, in nft_rbtree_walk() argument 631 net = read_pnet(&set->net); in nft_rbtree_gc() 741 nft_rbtree_gc(set); in nft_rbtree_commit() [all …]
|
| A D | nft_set_bitmap.c | 58 if (set->klen == 2) in nft_bitmap_location() 87 nft_bitmap_location(set, key, &idx, &off); in nft_bitmap_lookup() 138 struct nft_bitmap *priv = nft_set_priv(set); in nft_bitmap_insert() 160 struct nft_bitmap *priv = nft_set_priv(set); in nft_bitmap_remove() 171 const struct nft_set *set, in nft_bitmap_activate() argument 175 struct nft_bitmap *priv = nft_set_priv(set); in nft_bitmap_activate() 186 const struct nft_set *set, in nft_bitmap_flush() argument 190 struct nft_bitmap *priv = nft_set_priv(set); in nft_bitmap_flush() 205 struct nft_bitmap *priv = nft_set_priv(set); in nft_bitmap_deactivate() 223 struct nft_set *set, in nft_bitmap_walk() argument [all …]
|
| A D | nf_tables_api.c | 828 set->ops->walk(ctx, set, &iter); in nft_map_deactivate() 5643 set->ops->destroy(ctx, set); in nft_set_destroy() 6202 if (set == dump_ctx->set) { in nf_tables_dump_set() 6516 dump_ctx->set = set; in nft_set_dump_ctx_init() 6672 te->set = set; in nft_trans_elem_alloc() 6694 set->ops->gc_init(set); in nft_set_elem_expr_alloc() 10538 trans->set = set; in nft_trans_gc_alloc() 10571 set = gc->set; in nft_trans_gc_queue_async() 10597 set = gc->set; in nft_trans_gc_queue_sync() 10840 set->ops->commit(set); in nft_set_commit_update() [all …]
|
| A D | nft_objref.c | 100 struct nft_set *set; member 110 const struct nft_set *set = priv->set; in nft_objref_map_eval() local 117 ext = nft_set_catchall_lookup(net, set); in nft_objref_map_eval() 133 struct nft_set *set; in nft_objref_map_init() local 139 if (IS_ERR(set)) in nft_objref_map_init() 140 return PTR_ERR(set); in nft_objref_map_init() 142 if (!(set->flags & NFT_SET_OBJECT)) in nft_objref_map_init() 146 set->klen); in nft_objref_map_init() 156 priv->set = set; in nft_objref_map_init() 189 nf_tables_activate_set(ctx, priv->set); in nft_objref_map_activate() [all …]
|
| /net/netfilter/ipvs/ |
| A D | ip_vs_lblcr.c | 118 list_add_rcu(&e->list, &set->list); in ip_vs_dest_set_insert() 119 atomic_inc(&set->size); in ip_vs_dest_set_insert() 121 set->lastmod = jiffies; in ip_vs_dest_set_insert() 141 atomic_dec(&set->size); in ip_vs_dest_set_erase() 142 set->lastmod = jiffies; in ip_vs_dest_set_erase() 216 if (set == NULL) in ip_vs_dest_set_max() 303 ip_vs_dest_set_eraseall(&en->set); in ip_vs_lblcr_free() 376 atomic_set(&(en->set.size), 0); in ip_vs_lblcr_new() 377 INIT_LIST_HEAD(&en->set.list); in ip_vs_lblcr_new() 660 dest = ip_vs_dest_set_min(&en->set); in ip_vs_lblcr_schedule() [all …]
|
| /net/sched/ |
| A D | em_ipset.c | 22 struct xt_set_info *set = data; in em_ipset_change() local 25 if (data_len != sizeof(*set)) in em_ipset_change() 28 index = ip_set_nfnl_get_byindex(net, set->index); in em_ipset_change() 32 em->datalen = sizeof(*set); in em_ipset_change() 43 const struct xt_set_info *set = (const void *) em->data; in em_ipset_destroy() local 44 if (set) { in em_ipset_destroy() 45 ip_set_nfnl_put(em->net, set->index); in em_ipset_destroy() 55 const struct xt_set_info *set = (const void *) em->data; in em_ipset_match() local 81 opt.dim = set->dim; in em_ipset_match() 82 opt.flags = set->flags; in em_ipset_match() [all …]
|