]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: consolidate evaluation of symbol range expression
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 21 Feb 2025 23:56:32 +0000 (00:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 25 Feb 2025 23:09:30 +0000 (00:09 +0100)
commitfe6cc0ad29cd4bca9cd1fee2b5fb0d42b3e1e073
tree6bac01a6aaaf2e3b49b3d1ff22de897e3fd0c245
parentdeda274293f80f9718de4cbb416bd2b2bf296709
evaluate: consolidate evaluation of symbol range expression

Expand symbol_range to range expression to consolidate evaluation.

I found a bug when testing for negative ranges:

  test.nft:5:16-30: Error: Could not process rule: File exists
                  elements = { 1.1.1.1-1.1.1.0 }
                               ^^^^^^^^^^^^^^^

after this patch, error reporting has been restored:

  test.nft:5:16-30: Error: Range negative size
                  elements = { 1.1.1.1-1.1.1.0 }
                               ^^^^^^^^^^^^^^^

Fixes: 347039f64509 ("src: add symbol range expression to further compact intervals")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c