mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 22:36:39 +07:00
[NETFILTER]: nfnetlink_queue: allow changing queue length through netlink
Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
7b621c1ea6
commit
829e17a1a6
@ -82,6 +82,7 @@ enum nfqnl_attr_config {
|
||||
NFQA_CFG_UNSPEC,
|
||||
NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */
|
||||
NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */
|
||||
NFQA_CFG_QUEUE_MAXLEN, /* u_int32_t */
|
||||
__NFQA_CFG_MAX
|
||||
};
|
||||
#define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
|
||||
|
@ -947,6 +947,14 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
|
||||
ntohl(params->copy_range));
|
||||
}
|
||||
|
||||
if (nfqa[NFQA_CFG_QUEUE_MAXLEN-1]) {
|
||||
__be32 *queue_maxlen;
|
||||
queue_maxlen = NFA_DATA(nfqa[NFQA_CFG_QUEUE_MAXLEN-1]);
|
||||
spin_lock_bh(&queue->lock);
|
||||
queue->queue_maxlen = ntohl(*queue_maxlen);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
}
|
||||
|
||||
out_put:
|
||||
instance_put(queue);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user