diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-05-30 20:01:43 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-06-02 18:08:41 +0200 |
commit | 09565a4b1ed4863d44c4509a93c50f44efd12771 (patch) | |
tree | 427e3c4d18086a913a3f480f7f374cdf6785a8fc /tests/regression/inet | |
parent | 9a03828e41695f4694a0b7f711bb01bba3b0a39e (diff) |
netlink_delinearize: consolidate range printing
This patch adds a routine to the postprocess stage to check if the previous
expression statement and the current actually represent a range, so we can
provide a more compact listing, eg.
# nft -nn list table test
table ip test {
chain test {
tcp dport 22
tcp dport 22-23
tcp dport != 22-23
ct mark != 0x00000016-0x00000017
ct mark 0x00000016-0x00000017
mark 0x00000016-0x00000017
mark != 0x00000016-0x00000017
}
}
To do so, the context state stores a pointer to the current statement. This
pointer needs to be invalidated in case the current statement is replaced.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/regression/inet')
0 files changed, 0 insertions, 0 deletions