]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: Allow reset single stateful object
authorElise Lennion <elise.lennion@gmail.com>
Thu, 26 Jan 2017 17:09:44 +0000 (15:09 -0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 27 Jan 2017 12:33:20 +0000 (13:33 +0100)
commitd545778d5933ab20c1d9d34a44ae93b2668c60d2
tree0682f07a04c864d14a355f344e661121624c89d4
parent0011985554e269e1cc8f8e5b41eb9dcd795ebe8c
src: Allow reset single stateful object

Currently the stateful objects can only be reseted in groups. With this
patch reseting a single object is allowed:

$ nft reset counter filter https-traffic
table ip filter {
counter https-traffic {
packets 8774 bytes 542668
}
}

$ nft list counter filter https-traffic
table ip filter {
counter https-traffic {
packets 0 bytes 0
}
}

Heavily based on work from Pablo Neira Ayuso <pablo@netfilter.org>.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/mnl.h
include/netlink.h
src/evaluate.c
src/mnl.c
src/netlink.c
src/parser_bison.y
src/rule.c