diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-10-22 22:25:09 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-10-27 14:58:55 +0200 |
commit | 4a1797e2b8eb055c6016e1092ac5dfb8f1e49914 (patch) | |
tree | 6d76c0ee9ab8d1e09afe2b078c8ff62ac5683c99 /lib/session.c | |
parent | 18f0b2c43994f4a626b449a4d771c7002f4e42e2 (diff) |
Introduction of new commands and protocol version 7
Two new commands (IPSET_CMD_GET_BYNAME, IPSET_CMD_GET_BYINDEX) are
introduced. The new commands makes possible to eliminate the getsockopt
operation (in iptables set/SET match/target) and thus use only netlink
communication between userspace and kernel for ipset. With the new
protocol version, userspace can exactly know which functionality is
supported by the running kernel.
Both the kernel and userspace is fully backward compatible.
Diffstat (limited to 'lib/session.c')
-rw-r--r-- | lib/session.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/session.c b/lib/session.c index c19191a..768cc05 100644 --- a/lib/session.c +++ b/lib/session.c @@ -365,6 +365,10 @@ static const struct ipset_attr_policy cmd_attrs[] = { .type = MNL_TYPE_U32, .opt = IPSET_OPT_LINENO, }, + [IPSET_ATTR_INDEX] = { + .type = MNL_TYPE_U16, + .opt = IPSET_OPT_INDEX, + }, }; static const struct ipset_attr_policy create_attrs[] = { |