From 4a1797e2b8eb055c6016e1092ac5dfb8f1e49914 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 22 Oct 2018 22:25:09 +0200 Subject: 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. --- lib/session.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/session.c') 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[] = { -- cgit v1.2.3