Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2008-2009 Patrick McHardy <kaber@trash.net> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * Development of this code funded by Astaro AG (http://www.astaro.com/) |
| 9 | */ |
| 10 | |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/module.h> |
| 14 | #include <linux/list.h> |
| 15 | #include <linux/rbtree.h> |
| 16 | #include <linux/netlink.h> |
| 17 | #include <linux/netfilter.h> |
| 18 | #include <linux/netfilter/nf_tables.h> |
| 19 | #include <net/netfilter/nf_tables.h> |
| 20 | |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 21 | static DEFINE_SPINLOCK(nft_rbtree_lock); |
| 22 | |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 23 | struct nft_rbtree { |
| 24 | struct rb_root root; |
| 25 | }; |
| 26 | |
| 27 | struct nft_rbtree_elem { |
| 28 | struct rb_node node; |
Patrick McHardy | fe2811e | 2015-03-25 13:07:50 +0000 | [diff] [blame] | 29 | struct nft_set_ext ext; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 30 | }; |
| 31 | |
Pablo Neira Ayuso | ef1d20e | 2016-04-12 23:50:36 +0200 | [diff] [blame] | 32 | static bool nft_rbtree_interval_end(const struct nft_rbtree_elem *rbe) |
| 33 | { |
| 34 | return nft_set_ext_exists(&rbe->ext, NFT_SET_EXT_FLAGS) && |
| 35 | (*nft_set_ext_flags(&rbe->ext) & NFT_SET_ELEM_INTERVAL_END); |
| 36 | } |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 37 | |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 38 | static bool nft_rbtree_equal(const struct nft_set *set, const void *this, |
| 39 | const struct nft_rbtree_elem *interval) |
| 40 | { |
| 41 | return memcmp(this, nft_set_ext_key(&interval->ext), set->klen) == 0; |
| 42 | } |
| 43 | |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 44 | static bool nft_rbtree_lookup(const struct net *net, const struct nft_set *set, |
| 45 | const u32 *key, const struct nft_set_ext **ext) |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 46 | { |
| 47 | const struct nft_rbtree *priv = nft_set_priv(set); |
| 48 | const struct nft_rbtree_elem *rbe, *interval = NULL; |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 49 | u8 genmask = nft_genmask_cur(net); |
Patrick McHardy | 16c45ed | 2015-03-21 15:19:14 +0000 | [diff] [blame] | 50 | const struct rb_node *parent; |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 51 | const void *this; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 52 | int d; |
| 53 | |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 54 | spin_lock_bh(&nft_rbtree_lock); |
Patrick McHardy | 16c45ed | 2015-03-21 15:19:14 +0000 | [diff] [blame] | 55 | parent = priv->root.rb_node; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 56 | while (parent != NULL) { |
| 57 | rbe = rb_entry(parent, struct nft_rbtree_elem, node); |
| 58 | |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 59 | this = nft_set_ext_key(&rbe->ext); |
| 60 | d = memcmp(this, key, set->klen); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 61 | if (d < 0) { |
| 62 | parent = parent->rb_left; |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 63 | /* In case of adjacent ranges, we always see the high |
| 64 | * part of the range in first place, before the low one. |
| 65 | * So don't update interval if the keys are equal. |
| 66 | */ |
| 67 | if (interval && nft_rbtree_equal(set, this, interval)) |
| 68 | continue; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 69 | interval = rbe; |
| 70 | } else if (d > 0) |
| 71 | parent = parent->rb_right; |
| 72 | else { |
| 73 | found: |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 74 | if (!nft_set_elem_active(&rbe->ext, genmask)) { |
| 75 | parent = parent->rb_left; |
| 76 | continue; |
| 77 | } |
Pablo Neira Ayuso | ef1d20e | 2016-04-12 23:50:36 +0200 | [diff] [blame] | 78 | if (nft_rbtree_interval_end(rbe)) |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 79 | goto out; |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 80 | spin_unlock_bh(&nft_rbtree_lock); |
Patrick McHardy | b2832dd | 2015-03-25 14:08:48 +0000 | [diff] [blame] | 81 | |
| 82 | *ext = &rbe->ext; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 83 | return true; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | if (set->flags & NFT_SET_INTERVAL && interval != NULL) { |
| 88 | rbe = interval; |
| 89 | goto found; |
| 90 | } |
| 91 | out: |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 92 | spin_unlock_bh(&nft_rbtree_lock); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 93 | return false; |
| 94 | } |
| 95 | |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 96 | static int __nft_rbtree_insert(const struct net *net, const struct nft_set *set, |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 97 | struct nft_rbtree_elem *new) |
| 98 | { |
| 99 | struct nft_rbtree *priv = nft_set_priv(set); |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 100 | u8 genmask = nft_genmask_next(net); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 101 | struct nft_rbtree_elem *rbe; |
| 102 | struct rb_node *parent, **p; |
| 103 | int d; |
| 104 | |
| 105 | parent = NULL; |
| 106 | p = &priv->root.rb_node; |
| 107 | while (*p != NULL) { |
| 108 | parent = *p; |
| 109 | rbe = rb_entry(parent, struct nft_rbtree_elem, node); |
Patrick McHardy | e562d86 | 2015-04-11 02:27:34 +0100 | [diff] [blame] | 110 | d = memcmp(nft_set_ext_key(&rbe->ext), |
| 111 | nft_set_ext_key(&new->ext), |
| 112 | set->klen); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 113 | if (d < 0) |
| 114 | p = &parent->rb_left; |
| 115 | else if (d > 0) |
| 116 | p = &parent->rb_right; |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 117 | else { |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 118 | if (nft_set_elem_active(&rbe->ext, genmask)) { |
| 119 | if (nft_rbtree_interval_end(rbe) && |
| 120 | !nft_rbtree_interval_end(new)) |
| 121 | p = &parent->rb_left; |
| 122 | else if (!nft_rbtree_interval_end(rbe) && |
| 123 | nft_rbtree_interval_end(new)) |
| 124 | p = &parent->rb_right; |
| 125 | else |
| 126 | return -EEXIST; |
| 127 | } |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 128 | } |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 129 | } |
| 130 | rb_link_node(&new->node, parent, p); |
| 131 | rb_insert_color(&new->node, &priv->root); |
| 132 | return 0; |
| 133 | } |
| 134 | |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 135 | static int nft_rbtree_insert(const struct net *net, const struct nft_set *set, |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 136 | const struct nft_set_elem *elem) |
| 137 | { |
Patrick McHardy | fe2811e | 2015-03-25 13:07:50 +0000 | [diff] [blame] | 138 | struct nft_rbtree_elem *rbe = elem->priv; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 139 | int err; |
| 140 | |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 141 | spin_lock_bh(&nft_rbtree_lock); |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 142 | err = __nft_rbtree_insert(net, set, rbe); |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 143 | spin_unlock_bh(&nft_rbtree_lock); |
Patrick McHardy | fe2811e | 2015-03-25 13:07:50 +0000 | [diff] [blame] | 144 | |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 145 | return err; |
| 146 | } |
| 147 | |
| 148 | static void nft_rbtree_remove(const struct nft_set *set, |
| 149 | const struct nft_set_elem *elem) |
| 150 | { |
| 151 | struct nft_rbtree *priv = nft_set_priv(set); |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 152 | struct nft_rbtree_elem *rbe = elem->priv; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 153 | |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 154 | spin_lock_bh(&nft_rbtree_lock); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 155 | rb_erase(&rbe->node, &priv->root); |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 156 | spin_unlock_bh(&nft_rbtree_lock); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 157 | } |
| 158 | |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 159 | static void nft_rbtree_activate(const struct net *net, |
| 160 | const struct nft_set *set, |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 161 | const struct nft_set_elem *elem) |
| 162 | { |
| 163 | struct nft_rbtree_elem *rbe = elem->priv; |
| 164 | |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 165 | nft_set_elem_change_active(net, set, &rbe->ext); |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 166 | } |
| 167 | |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 168 | static void *nft_rbtree_deactivate(const struct net *net, |
| 169 | const struct nft_set *set, |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 170 | const struct nft_set_elem *elem) |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 171 | { |
| 172 | const struct nft_rbtree *priv = nft_set_priv(set); |
| 173 | const struct rb_node *parent = priv->root.rb_node; |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 174 | struct nft_rbtree_elem *rbe, *this = elem->priv; |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 175 | u8 genmask = nft_genmask_next(net); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 176 | int d; |
| 177 | |
| 178 | while (parent != NULL) { |
| 179 | rbe = rb_entry(parent, struct nft_rbtree_elem, node); |
| 180 | |
Patrick McHardy | 7d74026 | 2015-04-11 02:27:39 +0100 | [diff] [blame] | 181 | d = memcmp(nft_set_ext_key(&rbe->ext), &elem->key.val, |
| 182 | set->klen); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 183 | if (d < 0) |
| 184 | parent = parent->rb_left; |
| 185 | else if (d > 0) |
| 186 | parent = parent->rb_right; |
| 187 | else { |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 188 | if (!nft_set_elem_active(&rbe->ext, genmask)) { |
| 189 | parent = parent->rb_left; |
| 190 | continue; |
| 191 | } |
Pablo Neira Ayuso | e701001 | 2016-04-12 23:50:37 +0200 | [diff] [blame] | 192 | if (nft_rbtree_interval_end(rbe) && |
| 193 | !nft_rbtree_interval_end(this)) { |
| 194 | parent = parent->rb_left; |
| 195 | continue; |
| 196 | } else if (!nft_rbtree_interval_end(rbe) && |
| 197 | nft_rbtree_interval_end(this)) { |
| 198 | parent = parent->rb_right; |
| 199 | continue; |
| 200 | } |
Pablo Neira Ayuso | 42a5576 | 2016-07-08 14:41:49 +0200 | [diff] [blame] | 201 | nft_set_elem_change_active(net, set, &rbe->ext); |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 202 | return rbe; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 203 | } |
| 204 | } |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 205 | return NULL; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | static void nft_rbtree_walk(const struct nft_ctx *ctx, |
| 209 | const struct nft_set *set, |
| 210 | struct nft_set_iter *iter) |
| 211 | { |
| 212 | const struct nft_rbtree *priv = nft_set_priv(set); |
Patrick McHardy | fe2811e | 2015-03-25 13:07:50 +0000 | [diff] [blame] | 213 | struct nft_rbtree_elem *rbe; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 214 | struct nft_set_elem elem; |
| 215 | struct rb_node *node; |
| 216 | |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 217 | spin_lock_bh(&nft_rbtree_lock); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 218 | for (node = rb_first(&priv->root); node != NULL; node = rb_next(node)) { |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 219 | rbe = rb_entry(node, struct nft_rbtree_elem, node); |
| 220 | |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 221 | if (iter->count < iter->skip) |
| 222 | goto cont; |
Pablo Neira Ayuso | 8588ac0 | 2016-06-11 12:20:27 +0800 | [diff] [blame] | 223 | if (!nft_set_elem_active(&rbe->ext, iter->genmask)) |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 224 | goto cont; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 225 | |
Patrick McHardy | fe2811e | 2015-03-25 13:07:50 +0000 | [diff] [blame] | 226 | elem.priv = rbe; |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 227 | |
| 228 | iter->err = iter->fn(ctx, set, iter, &elem); |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 229 | if (iter->err < 0) { |
| 230 | spin_unlock_bh(&nft_rbtree_lock); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 231 | return; |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 232 | } |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 233 | cont: |
| 234 | iter->count++; |
| 235 | } |
Pablo Neira Ayuso | 7632667 | 2014-05-28 15:27:18 +0200 | [diff] [blame] | 236 | spin_unlock_bh(&nft_rbtree_lock); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | static unsigned int nft_rbtree_privsize(const struct nlattr * const nla[]) |
| 240 | { |
| 241 | return sizeof(struct nft_rbtree); |
| 242 | } |
| 243 | |
| 244 | static int nft_rbtree_init(const struct nft_set *set, |
Patrick McHardy | c50b960 | 2014-03-28 10:19:47 +0000 | [diff] [blame] | 245 | const struct nft_set_desc *desc, |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 246 | const struct nlattr * const nla[]) |
| 247 | { |
| 248 | struct nft_rbtree *priv = nft_set_priv(set); |
| 249 | |
| 250 | priv->root = RB_ROOT; |
| 251 | return 0; |
| 252 | } |
| 253 | |
| 254 | static void nft_rbtree_destroy(const struct nft_set *set) |
| 255 | { |
| 256 | struct nft_rbtree *priv = nft_set_priv(set); |
| 257 | struct nft_rbtree_elem *rbe; |
| 258 | struct rb_node *node; |
| 259 | |
| 260 | while ((node = priv->root.rb_node) != NULL) { |
| 261 | rb_erase(node, &priv->root); |
| 262 | rbe = rb_entry(node, struct nft_rbtree_elem, node); |
Patrick McHardy | 61edafb | 2015-03-25 14:08:47 +0000 | [diff] [blame] | 263 | nft_set_elem_destroy(set, rbe); |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 264 | } |
| 265 | } |
| 266 | |
Patrick McHardy | c50b960 | 2014-03-28 10:19:47 +0000 | [diff] [blame] | 267 | static bool nft_rbtree_estimate(const struct nft_set_desc *desc, u32 features, |
| 268 | struct nft_set_estimate *est) |
| 269 | { |
| 270 | unsigned int nsize; |
| 271 | |
| 272 | nsize = sizeof(struct nft_rbtree_elem); |
Patrick McHardy | c50b960 | 2014-03-28 10:19:47 +0000 | [diff] [blame] | 273 | if (desc->size) |
| 274 | est->size = sizeof(struct nft_rbtree) + desc->size * nsize; |
| 275 | else |
| 276 | est->size = nsize; |
| 277 | |
| 278 | est->class = NFT_SET_CLASS_O_LOG_N; |
| 279 | |
| 280 | return true; |
| 281 | } |
| 282 | |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 283 | static struct nft_set_ops nft_rbtree_ops __read_mostly = { |
| 284 | .privsize = nft_rbtree_privsize, |
Patrick McHardy | fe2811e | 2015-03-25 13:07:50 +0000 | [diff] [blame] | 285 | .elemsize = offsetof(struct nft_rbtree_elem, ext), |
Patrick McHardy | c50b960 | 2014-03-28 10:19:47 +0000 | [diff] [blame] | 286 | .estimate = nft_rbtree_estimate, |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 287 | .init = nft_rbtree_init, |
| 288 | .destroy = nft_rbtree_destroy, |
| 289 | .insert = nft_rbtree_insert, |
| 290 | .remove = nft_rbtree_remove, |
Patrick McHardy | cc02e45 | 2015-03-25 14:08:50 +0000 | [diff] [blame] | 291 | .deactivate = nft_rbtree_deactivate, |
| 292 | .activate = nft_rbtree_activate, |
Patrick McHardy | 20a6934 | 2013-10-11 12:06:22 +0200 | [diff] [blame] | 293 | .lookup = nft_rbtree_lookup, |
| 294 | .walk = nft_rbtree_walk, |
| 295 | .features = NFT_SET_INTERVAL | NFT_SET_MAP, |
| 296 | .owner = THIS_MODULE, |
| 297 | }; |
| 298 | |
| 299 | static int __init nft_rbtree_module_init(void) |
| 300 | { |
| 301 | return nft_register_set(&nft_rbtree_ops); |
| 302 | } |
| 303 | |
| 304 | static void __exit nft_rbtree_module_exit(void) |
| 305 | { |
| 306 | nft_unregister_set(&nft_rbtree_ops); |
| 307 | } |
| 308 | |
| 309 | module_init(nft_rbtree_module_init); |
| 310 | module_exit(nft_rbtree_module_exit); |
| 311 | |
| 312 | MODULE_LICENSE("GPL"); |
| 313 | MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>"); |
| 314 | MODULE_ALIAS_NFT_SET(); |