nf_tables: add stateful objects
Subsystems (2)
Pablo Neira Ayuso
maintainerv2 cover nf_tables: add stateful objects
Hi,
This is the v2 of the stateful object patchset that was posted earlier this week:
http://marc.info/?l=netfilter-devel&m=148029128323837&w=2
Tentative userspace patchsets are available at:
http://git.netfilter.org/libnftnl/log/?h=stateful
http://git.netfilter.org/nftables/log/?h=stateful
I may still revisit userspace before upstream merge, this may result in syntax changes, so consider the userspace patchset work-in-progress.
Comments welcome,
Thanks.
Pablo Neira Ayuso (11):
netfilter: nf_tables: add stateful objects
netfilter: nft_counter: add stateful object type
netfilter: nft_quota: add stateful object type
netfilter: nf_tables: add stateful object reference expression
netfilter: nf_tables: atomic dump and reset for stateful objects
netfilter: nf_tables: notify internal updates of stateful objects
netfilter: nft_quota: dump consumed quota
netfilter: nft_quota: add depleted flag for objects
netfilter: nf_tables: add stateful object reference to set elements
netfilter: nft_objref: support for stateful object maps
netfilter: nf_tables: allow to filter stateful object dumps by type
include/net/netfilter/nf_tables.h | 95 +++++ include/uapi/linux/netfilter/nf_tables.h | 64 +++ net/netfilter/Kconfig | 6 + net/netfilter/Makefile | 1 + net/netfilter/nf_tables_api.c | 661 ++++++++++++++++++++++++++++++- net/netfilter/nft_counter.c | 163 ++++++-- net/netfilter/nft_objref.c | 226 +++++++++++ net/netfilter/nft_quota.c | 147 ++++++- 8 files changed, 1298 insertions(+), 65 deletions(-) create mode 100644 net/netfilter/nft_objref.c
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 1/11 netfilter: nf_tables: add stateful objects
This patch augments nf_tables to support stateful objects. This new infrastructure allows you to create, dump and delete stateful objects, that are identified by a user-defined name.
This patch adds the generic infrastructure, follow up patches add support for two stateful objects: counters and quotas.
This patch provides a native infrastructure for nf_tables to replace nfacct, the extended accounting infrastructure for iptables.
---
v2:
* Make sure runtime nft_object data is placed in one cacheline.
* Remove useless flags field from nft_object.
* Make nft_object_dump() static.
include/net/netfilter/nf_tables.h | 79 +++++ include/uapi/linux/netfilter/nf_tables.h | 29 ++ net/netfilter/nf_tables_api.c | 516 +++++++++++++++++++++++++++++++ 3 files changed, 624 insertions(+)
include/net/netfilter/nf_tables.h +79 -0
@@ -873,6 +873,7 @@ unsigned int nft_do_chain(struct nft_pktinfo *pkt, void *priv);* @list: used internally * @chains: chains in the table * @sets: sets in the table +* @objects: stateful objects in the table * @hgenerator: handle generator state * @use: number of chain references to this table * @flags: table flag (see enum nft_table_flags)
@@ -883,6 +884,7 @@ struct nft_table {struct list_head list;struct list_head chains;struct list_head sets; +struct list_head objects;u64 hgenerator;u32 use; u16 flags:14,
@@ -933,6 +935,73 @@ int nft_verdict_dump(struct sk_buff *skb, int type, const struct nft_verdict *v);/** +* struct nft_object - nf_tables stateful object +* +* @list: table stateful object list node +* @type: pointer to object type +* @data: pointer to object data +* @name: name of this stateful object +* @genmask: generation mask +* @use: number of references to this stateful object +* @data: object data, layout depends on type +*/ +struct nft_object { +struct list_head list; +char name[NFT_OBJ_MAXNAMELEN ]; +u32 genmask:2 , + use:30 ; +/* runtime data below here */ +const struct nft_object_type *type____cacheline_aligned ; +unsigned char data[] + __attribute__((aligned (__alignof__(u64 )))); +}; + +static inline void *nft_obj_data (const struct nft_object *obj) +{ +return (void *)obj->data; +} + +#define nft_expr_obj (expr) *((struct nft_object **)nft_expr_priv(expr)) + +struct nft_object *nf_tables_obj_lookup (const struct nft_table *table, +const struct nlattr *nla,u32 objtype, +u8 genmask); + +/** +* struct nft_object_type - stateful object type +* +* @eval: stateful object evaluation function +* @list: list node in list of object types +* @type: stateful object numeric type +* @size: stateful object size +* @owner: module owner +* @maxattr: maximum netlink attribute +* @policy: netlink attribute policy +* @init: initialize object from netlink attributes +* @destroy: release existing stateful object +* @dump: netlink dump stateful object +*/ +struct nft_object_type { +void (*eval)(struct nft_object *obj, +struct nft_regs *regs, +const struct nft_pktinfo *pkt); +struct list_head list; +u32 type; +unsigned int size; +unsigned int maxattr; +struct module *owner; +const struct nla_policy *policy; +int (*init)(const struct nlattr *const tb[], +struct nft_object *obj); +void (*destroy)(struct nft_object *obj); +int (*dump)(struct sk_buff *skb, +const struct nft_object *obj); +}; + +int nft_register_obj (struct nft_object_type *obj_type); +void nft_unregister_obj (struct nft_object_type *obj_type); + +/** * struct nft_traceinfo - nft tracing information and state * * @pkt: pktinfo currently processed
@@ -979,6 +1048,9 @@ void nft_trace_notify(struct nft_traceinfo *info);#define MODULE_ALIAS_NFT_SET () \ MODULE_ALIAS("nft-set") +#define MODULE_ALIAS_NFT_OBJ (type) \ + MODULE_ALIAS("nft-obj-" __stringify(type)) +/* * The gencursor defines two generations, the currently active and the * next one. Objects contain a bitmask of 2 bits specifying the generations
@@ -1155,4 +1227,11 @@ struct nft_trans_elem {#define nft_trans_elem (trans) \ (((struct nft_trans_elem *)trans->data)->elem) +struct nft_trans_obj { +struct nft_object *obj; +}; + +#define nft_trans_obj (trans) \ + (((struct nft_trans_obj *)trans->data)->obj) +#endif /* _NET_NF_TABLES_H */
include/uapi/linux/netfilter/nf_tables.h +29 -0
@@ -4,6 +4,7 @@#define NFT_TABLE_MAXNAMELEN 32#define NFT_CHAIN_MAXNAMELEN 32#define NFT_SET_MAXNAMELEN 32 +#define NFT_OBJ_MAXNAMELEN 32#define NFT_USERDATA_MAXLEN 256/**
@@ -85,6 +86,9 @@ enum nft_verdicts {* @NFT_MSG_NEWGEN: announce a new generation, only for events (enum nft_gen_attributes) * @NFT_MSG_GETGEN: get the rule-set generation (enum nft_gen_attributes) * @NFT_MSG_TRACE: trace event (enum nft_trace_attributes) +* @NFT_MSG_NEWOBJ: create a stateful object (enum nft_obj_attributes) +* @NFT_MSG_GETOBJ: get a stateful object (enum nft_obj_attributes) +* @NFT_MSG_DELOBJ: delete a stateful object (enum nft_obj_attributes) */ enum nf_tables_msg_types {NFT_MSG_NEWTABLE ,
@@ -105,6 +109,9 @@ enum nf_tables_msg_types {NFT_MSG_NEWGEN ,NFT_MSG_GETGEN ,NFT_MSG_TRACE , +NFT_MSG_NEWOBJ , +NFT_MSG_GETOBJ , +NFT_MSG_DELOBJ , NFT_MSG_MAX, };
@@ -1172,6 +1179,28 @@ enum nft_fib_flags { NFTA_FIB_F_OIF = 1 << 4, /* restrict to oif */ }; +#define NFT_OBJECT_UNSPEC 0 + +/** +* enum nft_object_attributes - nf_tables stateful object netlink attributes +* +* @NFTA_OBJ_TABLE: name of the table containing the expression (NLA_STRING) +* @NFTA_OBJ_NAME: name of this expression type (NLA_STRING) +* @NFTA_OBJ_TYPE: stateful object type (NLA_U32) +* @NFTA_OBJ_DATA: stateful object data (NLA_NESTED) +* @NFTA_OBJ_USE: number of references to this expression (NLA_U32) +*/ +enum nft_object_attributes { +NFTA_OBJ_UNSPEC , +NFTA_OBJ_TABLE , +NFTA_OBJ_NAME , +NFTA_OBJ_TYPE , +NFTA_OBJ_DATA , +NFTA_OBJ_USE , + __NFTA_OBJ_MAX +}; +#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1) +/** * enum nft_trace_attributes - nf_tables trace netlink attributes *
net/netfilter/nf_tables_api.c +516 -0
594 lines not on this page · raw message
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 2/11 netfilter: nft_counter: add stateful object type
In reply to Pablo Neira AyusoRegister a new percpu counter stateful object type into the stateful object infrastructure.
---
v2:
* fix nft_counter_module_init() error path.
include/uapi/linux/netfilter/nf_tables.h | 1 + net/netfilter/nft_counter.c | 140 +++++++++++++++++++++++++------ 2 files changed, 114 insertions(+), 27 deletions(-)
include/uapi/linux/netfilter/nf_tables.h +1 -0
@@ -1180,6 +1180,7 @@ enum nft_fib_flags { };#define NFT_OBJECT_UNSPEC 0 +#define NFT_OBJECT_COUNTER 1/** * enum nft_object_attributes - nf_tables stateful object netlink attributes
net/netfilter/nft_counter.c +113 -27
197 lines not on this page · raw message
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 3/11 netfilter: nft_quota: add stateful object type
In reply to Pablo Neira AyusoRegister a new quota stateful object type into the new stateful object infrastructure.
---
v2:
* fix nft_quota_module_init() error path.
include/uapi/linux/netfilter/nf_tables.h | 1 + net/netfilter/nft_quota.c | 96 +++++++++++++++++++++++++++----- 2 files changed, 84 insertions(+), 13 deletions(-)
include/uapi/linux/netfilter/nf_tables.h +1 -0
@@ -1181,6 +1181,7 @@ enum nft_fib_flags {#define NFT_OBJECT_UNSPEC 0#define NFT_OBJECT_COUNTER 1 +#define NFT_OBJECT_QUOTA 2/** * enum nft_object_attributes - nf_tables stateful object netlink attributes
net/netfilter/nft_quota.c +83 -13
136 lines not on this page · raw message
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 4/11 netfilter: nf_tables: add stateful object reference expression
In reply to Pablo Neira AyusoThis new expression allows us to refer to existing stateful objects from rules.
---
v2:
* Rename:
NFTA_OBJREF_TYPE -> NFTA_OBJREF_IMM_TYPE NFTA_OBJREF_NAME -> NFTA_OBJREF_IMM_NAME
so both refer to data that is pass as attribute, ie. not coming from any register.
include/uapi/linux/netfilter/nf_tables.h | 14 ++++ net/netfilter/Kconfig | 6 ++ net/netfilter/Makefile | 1 + net/netfilter/nft_objref.c | 112 +++++++++++++++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 net/netfilter/nft_objref.c
include/uapi/linux/netfilter/nf_tables.h +14 -0
@@ -1132,6 +1132,20 @@ enum nft_fwd_attributes {#define NFTA_FWD_MAX (__NFTA_FWD_MAX - 1)/** +* enum nft_objref_attributes - nf_tables stateful object expression netlink attributes +* +* @NFTA_OBJREF_IMM_TYPE: object type for immediate reference (NLA_U32: nft_register) +* @NFTA_OBJREF_IMM_NAME: object name for immediate reference (NLA_STRING) +*/ +enum nft_objref_attributes { +NFTA_OBJREF_UNSPEC , +NFTA_OBJREF_IMM_TYPE , +NFTA_OBJREF_IMM_NAME , + __NFTA_OBJREF_MAX +}; +#define NFTA_OBJREF_MAX (__NFTA_OBJREF_MAX - 1) + +/** * enum nft_gen_attributes - nf_tables ruleset generation attributes * * @NFTA_GEN_ID: Ruleset generation ID (NLA_U32)
net/netfilter/Kconfig +6 -0
@@ -551,6 +551,12 @@ config NFT_NAT This option adds the "nat" expression that you can use to perform typical Network Address Translation (NAT) packet transformations. +config NFT_OBJREF + tristate "Netfilter nf_tables stateful object reference module" + help + This option adds the "objref" expression that allows you to refer to + stateful objects, such as counters and quotas. + config NFT_QUEUE depends on NETFILTER_NETLINK_QUEUE tristate "Netfilter nf_tables queue module"
net/netfilter/Makefile +1 -0
@@ -89,6 +89,7 @@ obj-$(CONFIG_NFT_NUMGEN) += nft_numgen.o obj-$(CONFIG_NFT_CT) += nft_ct.o obj-$(CONFIG_NFT_LIMIT) += nft_limit.o obj-$(CONFIG_NFT_NAT) += nft_nat.o +obj-$(CONFIG_NFT_OBJREF) += nft_objref.o obj-$(CONFIG_NFT_QUEUE) += nft_queue.o obj-$(CONFIG_NFT_QUOTA) += nft_quota.o obj-$(CONFIG_NFT_REJECT) += nft_reject.o
net/netfilter/nft_objref.c new file +112 -0
112 lines not on this page · raw message
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 5/11 netfilter: nf_tables: atomic dump and reset for stateful objects
In reply to Pablo Neira AyusoThis patch adds a new NFT_MSG_GETOBJ_RESET command perform an atomic dump-and-reset of the stateful object. This also comes with add support for atomic dump and reset for counter and quota objects.
---
v2: Remove unnecessary nft_obj_dump() function, embed this code into
fill_info function.
include/net/netfilter/nf_tables.h | 3 ++- include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 29 ++++++++++++++++++++-------- net/netfilter/nft_counter.c | 33 ++++++++++++++++++++------------ net/netfilter/nft_quota.c | 12 +++++++----- 5 files changed, 53 insertions(+), 26 deletions(-)
include/net/netfilter/nf_tables.h +2 -1
@@ -995,7 +995,8 @@ struct nft_object_type { struct nft_object *obj);void (*destroy)(struct nft_object *obj);int (*dump)(struct sk_buff *skb, -const struct nft_object *obj); +struct nft_object *obj, +bool reset); };int nft_register_obj (struct nft_object_type *obj_type);
include/uapi/linux/netfilter/nf_tables.h +2 -0
@@ -89,6 +89,7 @@ enum nft_verdicts {* @NFT_MSG_NEWOBJ: create a stateful object (enum nft_obj_attributes) * @NFT_MSG_GETOBJ: get a stateful object (enum nft_obj_attributes) * @NFT_MSG_DELOBJ: delete a stateful object (enum nft_obj_attributes) +* @NFT_MSG_GETOBJ_RESET: get and reset a stateful object (enum nft_obj_attributes) */ enum nf_tables_msg_types {NFT_MSG_NEWTABLE ,
@@ -112,6 +113,7 @@ enum nf_tables_msg_types {NFT_MSG_NEWOBJ ,NFT_MSG_GETOBJ ,NFT_MSG_DELOBJ , +NFT_MSG_GETOBJ_RESET , NFT_MSG_MAX, };
net/netfilter/nf_tables_api.c +21 -8
@@ -3964,14 +3964,14 @@ static struct nft_object *nft_obj_init(const struct nft_object_type *type, }static int nft_object_dump (struct sk_buff *skb,unsigned int attr, -const struct nft_object *obj) +struct nft_object *obj,bool reset) {struct nlattr *nest; nest =nla_nest_start (skb, attr);if (!nest) goto nla_put_failure; -if (obj->type->dump (skb, obj) <0 ) +if (obj->type->dump (skb, obj, reset) <0 ) goto nla_put_failure;nla_nest_end (skb, nest);return 0 ;
@@ -4088,7 +4088,7 @@ static int nf_tables_newobj(struct net *net, struct sock *nlsk,static int nf_tables_fill_obj_info (struct sk_buff *skb,struct net *net,u32 portid,u32 seq,int event,u32 flags,int family,const struct nft_table *table, -const struct nft_object *obj) +struct nft_object *obj,bool reset) {struct nfgenmsg *nfmsg;struct nlmsghdr *nlh;
@@ -4107,7 +4107,7 @@ static int nf_tables_fill_obj_info(struct sk_buff *skb, struct net *net,nla_put_string (skb,NFTA_OBJ_NAME , obj->name) ||nla_put_be32 (skb,NFTA_OBJ_TYPE ,htonl (obj->type->type)) ||nla_put_be32 (skb,NFTA_OBJ_USE ,htonl (obj->use)) || - nft_object_dump(skb, NFTA_OBJ_DATA, obj)) + nft_object_dump(skb, NFTA_OBJ_DATA, obj, reset)) goto nla_put_failure;nlmsg_end (skb, nlh);
@@ -4123,10 +4123,14 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)const struct nfgenmsg *nfmsg =nlmsg_data (cb->nlh);const struct nft_af_info *afi;const struct nft_table *table; -const struct nft_object *obj;unsigned int idx =0 , s_idx = cb->args[0 ];struct net *net =sock_net (skb->sk);int family = nfmsg->nfgen_family; +struct nft_object *obj; +bool reset = false; + +if (NFNL_MSG_TYPE (cb->nlh->nlmsg_type) ==NFT_MSG_GETOBJ_RESET ) + reset = true;rcu_read_lock (); cb->seq = net->nft.base_seq;
@@ -4148,7 +4152,7 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb) cb->nlh->nlmsg_seq,NFT_MSG_NEWOBJ ,NLM_F_MULTI |NLM_F_APPEND , - afi->family, table, obj) < 0) + afi->family, table, obj, reset) < 0) goto done;nl_dump_check_consistent (cb,nlmsg_hdr (skb));
@@ -4175,6 +4179,7 @@ static int nf_tables_getobj(struct net *net, struct sock *nlsk,const struct nft_table *table;struct nft_object *obj;struct sk_buff *skb2; +bool reset = false;u32 objtype;int err;
@@ -4206,9 +4211,12 @@ static int nf_tables_getobj(struct net *net, struct sock *nlsk,if (!skb2)return -ENOMEM ; +if (NFNL_MSG_TYPE (nlh->nlmsg_type) ==NFT_MSG_GETOBJ_RESET ) + reset = true; + err =nf_tables_fill_obj_info (skb2, net,NETLINK_CB (skb).portid, nlh->nlmsg_seq,NFT_MSG_NEWOBJ ,0 , - family, table, obj); + family, table, obj, reset);if (err <0 ) goto err;
@@ -4283,7 +4291,7 @@ static int nf_tables_obj_notify(const struct nft_ctx *ctx, err =nf_tables_fill_obj_info (skb, ctx->net, ctx->portid, ctx->seq, event,0 , ctx->afi->family, ctx->table, - obj); + obj, false);if (err <0 ) {kfree_skb (skb); goto err;
@@ -4474,6 +4482,11 @@ static const struct nfnl_callback nf_tables_cb[NFT_MSG_MAX] = { .attr_count = NFTA_OBJ_MAX, .policy = nft_obj_policy, }, + [NFT_MSG_GETOBJ_RESET] = { + .call = nf_tables_getobj, + .attr_count = NFTA_OBJ_MAX, + .policy = nft_obj_policy, + }, };static void nft_chain_commit_update (struct nft_trans *trans)
net/netfilter/nft_counter.c +21 -12
@@ -100,21 +100,29 @@ static void nft_counter_obj_destroy(struct nft_object *obj)nft_counter_do_destroy (priv); } -static void nft_counter_fetch (const struct nft_counter_percpu __percpu *counter, -struct nft_counter *total) +static void nft_counter_fetch (struct nft_counter_percpu __percpu *counter, +struct nft_counter *total,bool reset) { -const struct nft_counter_percpu *cpu_stats; +struct nft_counter_percpu *cpu_stats;u64 bytes, packets;unsigned int seq;int cpu;memset (total,0 ,sizeof (*total));for_each_possible_cpu (cpu) { +if (reset) + bytes = packets =0 ; + cpu_stats =per_cpu_ptr (counter, cpu);do { seq =u64_stats_fetch_begin_irq (&cpu_stats->syncp); - bytes = cpu_stats->counter.bytes; - packets = cpu_stats->counter.packets; +if (reset) { + packets +=xchg (&cpu_stats->counter.packets,0 ); + bytes +=xchg (&cpu_stats->counter.bytes,0 ); + }else { + bytes = cpu_stats->counter.bytes; + packets = cpu_stats->counter.packets; + } }while (u64_stats_fetch_retry_irq (&cpu_stats->syncp, seq)); total->packets += packets;
@@ -123,11 +131,12 @@ static void nft_counter_fetch(const struct nft_counter_percpu __percpu *counter, }static int nft_counter_do_dump (struct sk_buff *skb, -const struct nft_counter_percpu_priv *priv) +const struct nft_counter_percpu_priv *priv, +bool reset) {struct nft_counter total; -nft_counter_fetch (priv->counter, &total); +nft_counter_fetch (priv->counter, &total, reset); if (nla_put_be64(skb, NFTA_COUNTER_BYTES, cpu_to_be64(total.bytes), NFTA_COUNTER_PAD) ||
@@ -141,11 +150,11 @@ static int nft_counter_do_dump(struct sk_buff *skb, }static int nft_counter_obj_dump (struct sk_buff *skb, -const struct nft_object *obj) +struct nft_object *obj,bool reset) { -const struct nft_counter_percpu_priv *priv =nft_obj_data (obj); +struct nft_counter_percpu_priv *priv =nft_obj_data (obj); -return nft_counter_do_dump (skb, priv); +return nft_counter_do_dump (skb, priv, reset); }static const struct nla_policy nft_counter_policy[NFTA_COUNTER_MAX +1 ] = {
@@ -178,7 +187,7 @@ static int nft_counter_dump(struct sk_buff *skb, const struct nft_expr *expr) {const struct nft_counter_percpu_priv *priv =nft_expr_priv (expr); -return nft_counter_do_dump (skb, priv); +return nft_counter_do_dump (skb, priv, false); } static int nft_counter_init(const struct nft_ctx *ctx,
@@ -206,7 +215,7 @@ static int nft_counter_clone(struct nft_expr *dst, const struct nft_expr *src)struct nft_counter_percpu *this_cpu;struct nft_counter total; -nft_counter_fetch (priv->counter, &total); +nft_counter_fetch (priv->counter, &total, false); cpu_stats = __netdev_alloc_pcpu_stats(struct nft_counter_percpu,GFP_ATOMIC );
net/netfilter/nft_quota.c +7 -5
@@ -83,7 +83,8 @@ static int nft_quota_obj_init(const struct nlattr * const tb[],return nft_quota_do_init (tb, priv); } -static int nft_quota_do_dump (struct sk_buff *skb,const struct nft_quota *priv) +static int nft_quota_do_dump (struct sk_buff *skb,struct nft_quota *priv, +bool reset) {u32 flags = priv->invert ?NFT_QUOTA_F_INV :0 ;
@@ -97,11 +98,12 @@ static int nft_quota_do_dump(struct sk_buff *skb, const struct nft_quota *priv)return -1 ; } -static int nft_quota_obj_dump (struct sk_buff *skb,const struct nft_object *obj) +static int nft_quota_obj_dump (struct sk_buff *skb,struct nft_object *obj, +bool reset) {struct nft_quota *priv =nft_obj_data (obj); -return nft_quota_do_dump (skb, priv); +return nft_quota_do_dump (skb, priv, reset); }static struct nft_object_type nft_quota_obj__read_mostly = {
@@ -135,9 +137,9 @@ static int nft_quota_init(const struct nft_ctx *ctx,static int nft_quota_dump (struct sk_buff *skb,const struct nft_expr *expr) { -const struct nft_quota *priv =nft_expr_priv (expr); +struct nft_quota *priv =nft_expr_priv (expr); -return nft_quota_do_dump (skb, priv); +return nft_quota_do_dump (skb, priv, false); }static struct nft_expr_type nft_quota_type;
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 6/11 netfilter: nf_tables: notify internal updates of stateful objects
In reply to Pablo Neira AyusoIntroduce nf_tables_obj_notify() to notify internal state changes in stateful objects. This is used by the quota object to report depletion in a follow up patch.
---
v2: No changes.
include/net/netfilter/nf_tables.h | 4 ++++ net/netfilter/nf_tables_api.c | 31 +++++++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-)
include/net/netfilter/nf_tables.h +4 -0
@@ -967,6 +967,10 @@ struct nft_object *nf_tables_obj_lookup(const struct nft_table *table, const struct nlattr *nla, u32 objtype, u8 genmask); +int nft_obj_notify (struct net *net,struct nft_table *table, +struct nft_object *obj,u32 portid,u32 seq, +int event,int family,int report,gfp_t gfp); +/** * struct nft_object_type - stateful object type *
net/netfilter/nf_tables_api.c +19 -12
@@ -4274,38 +4274,45 @@ static int nf_tables_delobj(struct net *net, struct sock *nlsk,return nft_delobj (&ctx, obj); } -static int nf_tables_obj_notify (const struct nft_ctx *ctx, -struct nft_object *obj,int event) +int nft_obj_notify (struct net *net,struct nft_table *table, +struct nft_object *obj,u32 portid,u32 seq,int event, +int family,int report,gfp_t gfp) {struct sk_buff *skb;int err; -if (!ctx->report && - !nfnetlink_has_listeners (ctx->net,NFNLGRP_NFTABLES )) +if (!report && + !nfnetlink_has_listeners (net,NFNLGRP_NFTABLES ))return 0 ; err = -ENOBUFS ; - skb =nlmsg_new (NLMSG_GOODSIZE ,GFP_KERNEL ); + skb =nlmsg_new (NLMSG_GOODSIZE , gfp);if (skb ==NULL ) goto err; - err =nf_tables_fill_obj_info (skb, ctx->net, ctx->portid, ctx->seq, - event,0 , ctx->afi->family, ctx->table, - obj, false); + err =nf_tables_fill_obj_info (skb, net, portid, seq, event,0 , family, + table, obj, false);if (err <0 ) {kfree_skb (skb); goto err; } - err =nfnetlink_send (skb, ctx->net, ctx->portid,NFNLGRP_NFTABLES , - ctx->report,GFP_KERNEL ); + err =nfnetlink_send (skb, net, portid,NFNLGRP_NFTABLES , report, gfp); err:if (err <0 ) { -nfnetlink_set_err (ctx->net, ctx->portid,NFNLGRP_NFTABLES , - err); +nfnetlink_set_err (net, portid,NFNLGRP_NFTABLES , err); }return err; } +EXPORT_SYMBOL_GPL (nft_obj_notify); + +static int nf_tables_obj_notify (const struct nft_ctx *ctx, +struct nft_object *obj,int event) +{ +return nft_obj_notify (ctx->net, ctx->table, obj, ctx->portid, + ctx->seq, event, ctx->afi->family, ctx->report, +GFP_KERNEL ); +}static int nf_tables_fill_gen_info (struct sk_buff *skb,struct net *net,u32 portid,u32 seq)
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 7/11 netfilter: nft_quota: dump consumed quota
In reply to Pablo Neira AyusoAdd a new attribute NFTA_QUOTA_CONSUMED that displays the amount of quota that has been already consumed. This allows us to restore the internal state of the quota object between reboots as well as to monitor how wasted it is.
This patch changes the logic to account for the consumed bytes, instead of the bytes that remain to be consumed.
---
v2: Fix dump logic, nft_quota_do_dump() should include consumed bytes
larger than the total quota.
include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nft_quota.c | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-)
include/uapi/linux/netfilter/nf_tables.h +2 -0
@@ -984,12 +984,14 @@ enum nft_quota_flags {* * @NFTA_QUOTA_BYTES: quota in bytes (NLA_U16) * @NFTA_QUOTA_FLAGS: flags (NLA_U32) +* @NFTA_QUOTA_CONSUMED: quota already consumed in bytes (NLA_U64) */ enum nft_quota_attributes {NFTA_QUOTA_UNSPEC ,NFTA_QUOTA_BYTES ,NFTA_QUOTA_FLAGS ,NFTA_QUOTA_PAD , +NFTA_QUOTA_CONSUMED , __NFTA_QUOTA_MAX };#define NFTA_QUOTA_MAX (__NFTA_QUOTA_MAX - 1)
net/netfilter/nft_quota.c +15 -5
@@ -18,20 +18,20 @@struct nft_quota {u64 quota;bool invert; -atomic64_t remain; +atomic64_t consumed; };static inline bool nft_overquota (struct nft_quota *priv, -const struct nft_pktinfo *pkt) +const struct sk_buff *skb) { -return atomic64_sub_return (pkt->skb->len, &priv->remain) <0 ; +return atomic64_add_return (skb->len, &priv->consumed) >= priv->quota; }static inline void nft_quota_do_eval (struct nft_quota *priv,struct nft_regs *regs,const struct nft_pktinfo *pkt) { -if (nft_overquota (priv, pkt) ^ priv->invert) +if (nft_overquota (priv, pkt->skb) ^ priv->invert) regs->verdict.code =NFT_BREAK ; }
@@ -70,7 +70,7 @@ static int nft_quota_do_init(const struct nlattr * const tb[], priv->quota = quota; priv->invert = (flags &NFT_QUOTA_F_INV ) ? true : false; -atomic64_set (&priv->remain, quota); +atomic64_set (&priv->consumed,0 );return 0 ; }
@@ -87,9 +87,19 @@ static int nft_quota_do_dump(struct sk_buff *skb, struct nft_quota *priv, bool reset) {u32 flags = priv->invert ?NFT_QUOTA_F_INV :0 ; +u64 consumed; + + consumed =atomic64_read (&priv->consumed); +/* Since we inconditionally increment the quota for each packet that we +* see, don't puzzle userspace with a number going over the quota. +*/ +if (consumed > priv->quota) + consumed = priv->quota;if (nla_put_be64 (skb,NFTA_QUOTA_BYTES ,cpu_to_be64 (priv->quota),NFTA_QUOTA_PAD ) || +nla_put_be64 (skb,NFTA_QUOTA_CONSUMED ,cpu_to_be64 (consumed), +NFTA_QUOTA_PAD ) ||nla_put_be32 (skb,NFTA_QUOTA_FLAGS ,htonl (flags))) goto nla_put_failure;return 0 ;
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 8/11 netfilter: nft_quota: add depleted flag for objects
In reply to Pablo Neira AyusoNotify on depleted quota objects. The NFT_QUOTA_F_DEPLETED flag indicates we have reached overquota.
---
v2:
* Add table pointer to nft_object, so we can reach it when sending notifications as discussed with Florian.
* Fix broken depletion notification from nft_quota_obj_eval().
include/net/netfilter/nf_tables.h | 2 ++ include/uapi/linux/netfilter/nf_tables.h | 1 + net/netfilter/nf_tables_api.c | 1 + net/netfilter/nft_quota.c | 35 ++++++++++++++++++++++++++------ 4 files changed, 33 insertions(+), 6 deletions(-)
include/net/netfilter/nf_tables.h +2 -0
@@ -938,6 +938,7 @@ int nft_verdict_dump(struct sk_buff *skb, int type,* struct nft_object - nf_tables stateful object * * @list: table stateful object list node +* @table: table this object belongs to * @type: pointer to object type * @data: pointer to object data * @name: name of this stateful object
@@ -948,6 +949,7 @@ int nft_verdict_dump(struct sk_buff *skb, int type,struct nft_object {struct list_head list;char name[NFT_OBJ_MAXNAMELEN ]; +struct nft_table *table;u32 genmask:2 , use:30 ;/* runtime data below here */
include/uapi/linux/netfilter/nf_tables.h +1 -0
@@ -977,6 +977,7 @@ enum nft_queue_attributes {enum nft_quota_flags {NFT_QUOTA_F_INV = (1 <<0 ), +NFT_QUOTA_F_DEPLETED = (1 <<1 ), };/**
net/netfilter/nf_tables_api.c +1 -0
@@ -4067,6 +4067,7 @@ static int nf_tables_newobj(struct net *net, struct sock *nlsk, err =PTR_ERR (obj); goto err1; } + obj->table = table;nla_strlcpy (obj->name, nla[NFTA_OBJ_NAME ],NFT_OBJ_MAXNAMELEN ); err =nft_trans_obj_add (&ctx,NFT_MSG_NEWOBJ , obj);
net/netfilter/nft_quota.c +29 -6
@@ -17,7 +17,7 @@struct nft_quota {u64 quota; -bool invert; +unsigned long flags;atomic64_t consumed; };
@@ -27,11 +27,16 @@ static inline bool nft_overquota(struct nft_quota *priv,return atomic64_add_return (skb->len, &priv->consumed) >= priv->quota; } +static inline bool nft_quota_invert (struct nft_quota *priv) +{ +return priv->flags &NFT_QUOTA_F_INV ; +} +static inline void nft_quota_do_eval (struct nft_quota *priv,struct nft_regs *regs,const struct nft_pktinfo *pkt) { -if (nft_overquota (priv, pkt->skb) ^ priv->invert) +if (nft_overquota (priv, pkt->skb) ^nft_quota_invert (priv)) regs->verdict.code =NFT_BREAK ; }
@@ -45,14 +50,22 @@ static void nft_quota_obj_eval(struct nft_object *obj, const struct nft_pktinfo *pkt) {struct nft_quota *priv =nft_obj_data (obj); +bool overquota; -nft_quota_do_eval (priv, regs, pkt); + overquota =nft_overquota (priv, pkt->skb); +if (overquota ^nft_quota_invert (priv)) + regs->verdict.code =NFT_BREAK ; + +if (overquota && + !test_and_set_bit (NFT_QUOTA_F_DEPLETED , &priv->flags)) +nft_obj_notify (nft_net (pkt), obj->table, obj,0 ,0 , +NFT_MSG_NEWOBJ ,nft_pf (pkt),0 ,GFP_ATOMIC ); }static int nft_quota_do_init (const struct nlattr *const tb[],struct nft_quota *priv) { -u32 flags =0 ; +unsigned long flags =0 ;u64 quota;if (!tb[NFTA_QUOTA_BYTES ])
@@ -66,10 +79,12 @@ static int nft_quota_do_init(const struct nlattr * const tb[], flags =ntohl (nla_get_be32 (tb[NFTA_QUOTA_FLAGS ]));if (flags & ~NFT_QUOTA_F_INV )return -EINVAL ; +if (flags &NFT_QUOTA_F_DEPLETED ) +return -EOPNOTSUPP ; } priv->quota = quota; - priv->invert = (flags &NFT_QUOTA_F_INV ) ? true : false; + priv->flags = flags;atomic64_set (&priv->consumed,0 );return 0 ;
@@ -86,9 +101,17 @@ static int nft_quota_obj_init(const struct nlattr * const tb[],static int nft_quota_do_dump (struct sk_buff *skb,struct nft_quota *priv,bool reset) { -u32 flags = priv->invert ?NFT_QUOTA_F_INV :0 ; +unsigned long flags = priv->flags;u64 consumed; +if (reset) { + consumed =atomic64_xchg (&priv->consumed,0 ); +if (test_and_clear_bit (NFT_QUOTA_F_DEPLETED , &priv->flags)) + flags |=NFT_QUOTA_F_DEPLETED ; + }else { + consumed =atomic64_read (&priv->consumed); + } + consumed =atomic64_read (&priv->consumed);/* Since we inconditionally increment the quota for each packet that we * see, don't puzzle userspace with a number going over the quota.
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 9/11 netfilter: nf_tables: add stateful object reference to set elements
In reply to Pablo Neira AyusoThis patch allows you to refer to stateful objects from set elements. This provides the infrastructure to create maps where the right hand side of the mapping is a stateful object.
This allows us to build dictionaries of stateful objects, that you can use to perform fast lookups using any arbitrary key combination.
---
v2: No changes.
include/net/netfilter/nf_tables.h | 9 ++++ include/uapi/linux/netfilter/nf_tables.h | 8 ++++ net/netfilter/nf_tables_api.c | 70 +++++++++++++++++++++++++++----- 3 files changed, 77 insertions(+), 10 deletions(-)
include/net/netfilter/nf_tables.h +9 -0
@@ -326,6 +326,7 @@ void nft_unregister_set(struct nft_set_ops *ops);* @name: name of the set * @ktype: key type (numeric type defined by userspace, not used in the kernel) * @dtype: data type (verdict or numeric type defined by userspace) +* @objtype: object type (see NFT_OBJECT_* definitions) * @size: maximum set size * @nelems: number of elements * @ndeact: number of deactivated elements queued for removal
@@ -347,6 +348,7 @@ struct nft_set {char name[NFT_SET_MAXNAMELEN ];u32 ktype;u32 dtype; +u32 objtype;u32 size;atomic_t nelems;u32 ndeact;
@@ -416,6 +418,7 @@ void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set,* @NFT_SET_EXT_EXPIRATION: element expiration time * @NFT_SET_EXT_USERDATA: user data associated with the element * @NFT_SET_EXT_EXPR: expression assiociated with the element +* @NFT_SET_EXT_OBJREF: stateful object reference associated with element * @NFT_SET_EXT_NUM: number of extension types */ enum nft_set_extensions {
@@ -426,6 +429,7 @@ enum nft_set_extensions {NFT_SET_EXT_EXPIRATION ,NFT_SET_EXT_USERDATA ,NFT_SET_EXT_EXPR , +NFT_SET_EXT_OBJREF , NFT_SET_EXT_NUM };
@@ -554,6 +558,11 @@ static inline struct nft_set_ext *nft_set_elem_ext(const struct nft_set *set,return elem + set->ops->elemsize; } +static inline struct nft_object **nft_set_ext_obj (const struct nft_set_ext *ext) +{ +return nft_set_ext (ext,NFT_SET_EXT_OBJREF ); +} + void *nft_set_elem_init(const struct nft_set *set, const struct nft_set_ext_tmpl *tmpl, const u32 *key, const u32 *data,
include/uapi/linux/netfilter/nf_tables.h +8 -0
@@ -255,6 +255,7 @@ enum nft_rule_compat_attributes {* @NFT_SET_MAP: set is used as a dictionary * @NFT_SET_TIMEOUT: set uses timeouts * @NFT_SET_EVAL: set contains expressions for evaluation +* @NFT_SET_OBJECT: set contains stateful objects */ enum nft_set_flags {NFT_SET_ANONYMOUS =0x1 ,
@@ -263,6 +264,7 @@ enum nft_set_flags {NFT_SET_MAP =0x8 ,NFT_SET_TIMEOUT =0x10 ,NFT_SET_EVAL =0x20 , + NFT_SET_OBJECT = 0x40, };/**
@@ -304,6 +306,7 @@ enum nft_set_desc_attributes {* @NFTA_SET_TIMEOUT: default timeout value (NLA_U64) * @NFTA_SET_GC_INTERVAL: garbage collection interval (NLA_U32) * @NFTA_SET_USERDATA: user data (NLA_BINARY) +* @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*) */ enum nft_set_attributes {NFTA_SET_UNSPEC ,
@@ -321,6 +324,7 @@ enum nft_set_attributes {NFTA_SET_GC_INTERVAL ,NFTA_SET_USERDATA ,NFTA_SET_PAD , +NFTA_SET_OBJ_TYPE , __NFTA_SET_MAX };#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
@@ -344,6 +348,7 @@ enum nft_set_elem_flags {* @NFTA_SET_ELEM_EXPIRATION: expiration time (NLA_U64) * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY) * @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes) +* @NFTA_SET_ELEM_OBJREF: stateful object reference (NLA_STRING) */ enum nft_set_elem_attributes {NFTA_SET_ELEM_UNSPEC ,
@@ -355,6 +360,7 @@ enum nft_set_elem_attributes {NFTA_SET_ELEM_USERDATA ,NFTA_SET_ELEM_EXPR ,NFTA_SET_ELEM_PAD , +NFTA_SET_ELEM_OBJREF , __NFTA_SET_ELEM_MAX };#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)
@@ -1201,6 +1207,8 @@ enum nft_fib_flags {#define NFT_OBJECT_UNSPEC 0#define NFT_OBJECT_COUNTER 1#define NFT_OBJECT_QUOTA 2 +#define __NFT_OBJECT_MAX 3 +#define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1)/** * enum nft_object_attributes - nf_tables stateful object netlink attributes
net/netfilter/nf_tables_api.c +60 -10
154 lines not on this page · raw message
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 10/11 netfilter: nft_objref: support for stateful object maps
In reply to Pablo Neira AyusoThis patch allows us to refer to stateful object dictionaries, the source register indicates the key data to be used to look up for the corresponding state object. We can refer to these maps through names or, alternatively, the map transaction id. This allows us to refer to both anonymous and named maps.
---
v2:
* Rename:
NFTA_OBJREF_SREG -> NFTA_OBJREF_SET_REG NFTA_OBJREF_MAP -> NFTA_OBJREF_SET_NAME NFTA_OBJREF_MAP_ID -> NFTA_OBJREF_SET_ID
to indicate that these attributes are only used when an object map is specified.
include/uapi/linux/netfilter/nf_tables.h | 6 ++ net/netfilter/nf_tables_api.c | 4 ++ net/netfilter/nft_objref.c | 116 ++++++++++++++++++++++++++++++- 3 files changed, 125 insertions(+), 1 deletion(-)
include/uapi/linux/netfilter/nf_tables.h +6 -0
@@ -1147,11 +1147,17 @@ enum nft_fwd_attributes {* * @NFTA_OBJREF_IMM_TYPE: object type for immediate reference (NLA_U32: nft_register) * @NFTA_OBJREF_IMM_NAME: object name for immediate reference (NLA_STRING) +* @NFTA_OBJREF_SET_SREG: source register of the data to look for (NLA_U32: nft_registers) +* @NFTA_OBJREF_SET_NAME: name of the set where to look for (NLA_STRING) +* @NFTA_OBJREF_SET_ID: id of the set where to look for in this transaction (NLA_U32) */ enum nft_objref_attributes {NFTA_OBJREF_UNSPEC ,NFTA_OBJREF_IMM_TYPE ,NFTA_OBJREF_IMM_NAME , +NFTA_OBJREF_SET_SREG , +NFTA_OBJREF_SET_NAME , +NFTA_OBJREF_SET_ID , __NFTA_OBJREF_MAX };#define NFTA_OBJREF_MAX (__NFTA_OBJREF_MAX - 1)
net/netfilter/nf_tables_api.c +4 -0
@@ -2504,6 +2504,7 @@ struct nft_set *nf_tables_set_lookup(const struct nft_table *table, }return ERR_PTR (-ENOENT ); } +EXPORT_SYMBOL_GPL (nf_tables_set_lookup); struct nft_set *nf_tables_set_lookup_byid(const struct net *net, const struct nlattr *nla,
@@ -2522,6 +2523,7 @@ struct nft_set *nf_tables_set_lookup_byid(const struct net *net, }return ERR_PTR (-ENOENT ); } +EXPORT_SYMBOL_GPL (nf_tables_set_lookup_byid);static int nf_tables_set_alloc_name (struct nft_ctx *ctx,struct nft_set *set,const char *name)
@@ -3118,6 +3120,7 @@ int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set,list_add_tail_rcu (&binding->list, &set->bindings);return 0 ; } +EXPORT_SYMBOL_GPL (nf_tables_bind_set);void nf_tables_unbind_set (const struct nft_ctx *ctx,struct nft_set *set,struct nft_set_binding *binding)
@@ -3128,6 +3131,7 @@ void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, nft_is_active(ctx->net, set))nf_tables_set_destroy (ctx, set); } +EXPORT_SYMBOL_GPL (nf_tables_unbind_set);const struct nft_set_ext_type nft_set_ext_types[] = { [NFT_SET_EXT_KEY ] = {
net/netfilter/nft_objref.c +115 -1
129 lines not on this page · raw message
Signature · 1 line
2.1.4
Pablo Neira Ayuso
maintainerPATCH v2 11/11 netfilter: nf_tables: allow to filter stateful object dumps by type
In reply to Pablo Neira AyusoThis patch adds the netlink code to filter out dump of stateful objects, through the NFTA_OBJ_TYPE netlink attribute.
---
v2: Fix broken filtering by replacing "continue;" by "goto cont;" in
nf_tables_dump_obj() loop.
net/netfilter/nf_tables_api.c | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
net/netfilter/nf_tables_api.c +50 -0
@@ -4173,12 +4173,18 @@ static int nf_tables_fill_obj_info(struct sk_buff *skb, struct net *net,return -1 ; } +struct nft_obj_filter { +char table[NFT_OBJ_MAXNAMELEN ]; +u32 type; +}; +static int nf_tables_dump_obj (struct sk_buff *skb,struct netlink_callback *cb) {const struct nfgenmsg *nfmsg =nlmsg_data (cb->nlh);const struct nft_af_info *afi;const struct nft_table *table;unsigned int idx =0 , s_idx = cb->args[0 ]; +struct nft_obj_filter *filter = cb->data;struct net *net =sock_net (skb->sk);int family = nfmsg->nfgen_family;struct nft_object *obj;
@@ -4203,6 +4209,13 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)if (idx > s_idx)memset (&cb->args[1 ],0 ,sizeof (cb->args) -sizeof (cb->args[0 ])); +if (filter->table[0 ] && +strcmp (filter->table, table->name)) + goto cont; +if (filter->type !=NFT_OBJECT_UNSPEC && + obj->type->type != filter->type) + goto cont; + if (nf_tables_fill_obj_info(skb, net, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, NFT_MSG_NEWOBJ,
@@ -4223,6 +4236,31 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)return skb->len; } +static int nf_tables_dump_obj_done (struct netlink_callback *cb) +{ +kfree (cb->data); + +return 0 ; +} + +static struct nft_obj_filter * +nft_obj_filter_alloc (const struct nlattr *const nla[]) +{ +struct nft_obj_filter *filter; + + filter =kzalloc (sizeof (*filter),GFP_KERNEL ); +if (!filter) +return ERR_PTR (-ENOMEM ); + +if (nla[NFTA_OBJ_TABLE ]) +nla_strlcpy (filter->table, nla[NFTA_OBJ_TABLE ], +NFT_TABLE_MAXNAMELEN ); +if (nla[NFTA_OBJ_TYPE ]) + filter->type =ntohl (nla_get_be32 (nla[NFTA_OBJ_TYPE ])); + +return filter; +} +static int nf_tables_getobj (struct net *net,struct sock *nlsk,struct sk_buff *skb,const struct nlmsghdr *nlh,const struct nlattr *const nla[])
@@ -4241,7 +4279,19 @@ static int nf_tables_getobj(struct net *net, struct sock *nlsk,if (nlh->nlmsg_flags &NLM_F_DUMP ) {struct netlink_dump_control c = { .dump = nf_tables_dump_obj, + .done = nf_tables_dump_obj_done, }; + +if (nla[NFTA_OBJ_TABLE ] || + nla[NFTA_OBJ_TYPE ]) { +struct nft_obj_filter *filter; + + filter =nft_obj_filter_alloc (nla); +if (IS_ERR (filter)) +return -ENOMEM ; + + c.data = filter; + }return netlink_dump_start (nlsk, skb, nlh, &c); }
Signature · 1 line
2.1.4