summaryrefslogtreecommitdiffstats
path: root/Make_global.am
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-07-03 13:24:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2020-07-04 00:06:46 +0200
commit9297f5b5301b76bb24513b114f905e6fac0a90cd (patch)
treeaac5219a11cde63e57185948523b552b64d8b62b /Make_global.am
parentfb1486439b6d62cad104b83ecd04ec1a54fc9cae (diff)
src: Allow for empty set variable definitionHEADmaster
Allow for empty set definition in variables if they are merged to non-empty set definition: define BASE_ALLOWED_INCOMING_TCP_PORTS = {22, 80, 443} define EXTRA_ALLOWED_INCOMING_TCP_PORTS = {} table inet filter { chain input { type filter hook input priority 0; policy drop; tcp dport {$BASE_ALLOWED_INCOMING_TCP_PORTS, $EXTRA_ALLOWED_INCOMING_TCP_PORTS} ct state new counter accept } } However, disallow this: define EXTRA_ALLOWED_INCOMING_TCP_PORTS = {} table inet filter { chain input { type filter hook input priority 0; policy drop; tcp dport {$EXTRA_ALLOWED_INCOMING_TCP_PORTS} ct state new counter accept } } # nft -f x.nft /tmp/x.nft:6:18-52: Error: Set is empty tcp dport {$EXTRA_ALLOWED_INCOMING_TCP_PORTS} ct state new counter accept ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'Make_global.am')
0 files changed, 0 insertions, 0 deletions