summaryrefslogtreecommitdiffstats
path: root/src/flowtable.c
Commit message (Collapse)AuthorAgeFilesLines
* flowtable: Fix for reading garbagePhil Sutter2018-12-211-2/+2
| | | | | | | | | nftnl_flowtable_get_data() doesn't assign to passt data_len pointer destination in all cases, so initialize it to 0. Fixes: eb58f53372e74 ("src: add flowtable support") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* flowtable: Fix memleak in nftnl_flowtable_parse_devs()Phil Sutter2018-12-211-3/+7
| | | | | | | | | | Allocated strings in dev_array were not freed. Fix this by freeing them on error path and assigning them to c->dev_array directly in regular path. Fixes: eb58f53372e74 ("src: add flowtable support") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* flowtable: Fix use after free in two spotsPhil Sutter2018-12-211-6/+4
| | | | | | | | | When freeing flowtable devices array, the loop freeing each device string incorrectly included the call to free the device array itself. Fixes: eb58f53372e74 ("src: add flowtable support") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* flowtable: Add missing breakPhil Sutter2018-12-211-0/+1
| | | | | | | | | | In nftnl_flowtable_set_data(), when setting flowtable size, the switch() case fell through and the same value was copied into ft_flags field. This can't be right. Fixes: 41fe3d38ba34b ("flowtable: support for flags") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: remove json supportPablo Neira Ayuso2018-10-151-141/+5
| | | | | | We have better json support in libnftables these days. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: remove set/get array apiFlorian Westphal2018-03-121-12/+0
| | | | | | one-line wrapper, callers can use nftnl_flowtable_get/set instead. Signed-off-by: Florian Westphal <fw@strlen.de>
* flowtable: support for flagsPablo Neira Ayuso2018-03-051-3/+20
| | | | | | This new attribute allows you to specify the flowtable flags. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* flowtable: allow to specify sizePablo Neira Ayuso2018-03-051-2/+21
| | | | | | This new attribute allows you to specify the flowtable size. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add flowtable supportPablo Neira Ayuso2018-03-051-0/+793
This patch allows you to add, delete and list flowtable through the existing netlink interface. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>