summaryrefslogtreecommitdiff
path: root/net/psample
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-09-03 23:56:01 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-09-04 17:34:55 +0200
commit9dee1474121550b20542321f9e0579801c6b587c (patch)
treeb4ec2c6a0e33a1c05a6139b160310b3ad70e1d7e /net/psample
parenta8278400809dd99eb24468c02c8d4f0cb0003eae (diff)
netfilter: nf_tables: support for recursive chain deletion
This patch sorts out an asymmetry in deletions. Currently, table and set deletion commands come with an implicit content flush on deletion. However, chain deletion results in -EBUSY if there is content in this chain, so no implicit flush happens. So you have to send a flush command in first place to delete chains, this is inconsistent and it can be annoying in terms of user experience. This patch uses the new NLM_F_NONREC flag to request non-recursive chain deletion, ie. if the chain to be removed contains rules, then this returns EBUSY. This problem was discussed during the NFWS'17 in Faro, Portugal. In iptables, you hit -EBUSY if you try to delete a chain that contains rules, so you have to flush first before you can remove anything. Since iptables-compat uses the nf_tables netlink interface, it has to use the NLM_F_NONREC flag from userspace to retain the original iptables semantics, ie. bail out on removing chains that contain rules. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/psample')
0 files changed, 0 insertions, 0 deletions