diff options
author | Liping Zhang <liping.zhang@spreadtrum.com> | 2016-09-14 23:45:44 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-09-22 17:11:52 +0200 |
commit | f3bd67823b16fb7ef1ca4e4d93535f77eb0c2b53 (patch) | |
tree | f0c557ed9e06ec4eeae496fe3d6d423e795ee5ad /include | |
parent | 7898b0fb2018ecec894e8bf6cf1c1102a7b4c9ee (diff) |
expr: queue: add NFTA_QUEUE_SREG_QNUM attr support
After adding _SREG_QNUM attr, queuenum is not must option anymore,
so we must test NFTNL_EXPR_QUEUE_NUM first before dumpping queue num
in snprintf_default. Also add a tailing space in snprintf_default,
this is consistent with other expressions.
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/buffer.h | 1 | ||||
-rw-r--r-- | include/libnftnl/expr.h | 1 | ||||
-rw-r--r-- | include/linux/netfilter/nf_tables.h | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/include/buffer.h b/include/buffer.h index a753c78..ab1d468 100644 --- a/include/buffer.h +++ b/include/buffer.h @@ -77,6 +77,7 @@ int nftnl_buf_reg(struct nftnl_buf *b, int type, union nftnl_data_reg *reg, #define SREG_PROTO_MIN "sreg_proto_min" #define SREG_KEY "sreg_key" #define SREG_DATA "sreg_data" +#define SREG_QNUM "sreg_qnum" #define SREG "sreg" #define TABLE "table" #define TOTAL "total" diff --git a/include/libnftnl/expr.h b/include/libnftnl/expr.h index a8206ba..4ce2592 100644 --- a/include/libnftnl/expr.h +++ b/include/libnftnl/expr.h @@ -177,6 +177,7 @@ enum { NFTNL_EXPR_QUEUE_NUM = NFTNL_EXPR_BASE, NFTNL_EXPR_QUEUE_TOTAL, NFTNL_EXPR_QUEUE_FLAGS, + NFTNL_EXPR_QUEUE_SREG_QNUM, }; enum { diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h index 038895b..681082e 100644 --- a/include/linux/netfilter/nf_tables.h +++ b/include/linux/netfilter/nf_tables.h @@ -888,12 +888,14 @@ enum nft_log_attributes { * @NFTA_QUEUE_NUM: netlink queue to send messages to (NLA_U16) * @NFTA_QUEUE_TOTAL: number of queues to load balance packets on (NLA_U16) * @NFTA_QUEUE_FLAGS: various flags (NLA_U16) + * @NFTA_QUEUE_SREG_QNUM: source register of queue number (NLA_U32: nft_registers) */ enum nft_queue_attributes { NFTA_QUEUE_UNSPEC, NFTA_QUEUE_NUM, NFTA_QUEUE_TOTAL, NFTA_QUEUE_FLAGS, + NFTA_QUEUE_SREG_QNUM, __NFTA_QUEUE_MAX }; #define NFTA_QUEUE_MAX (__NFTA_QUEUE_MAX - 1) |