[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3c28e5ac-7163-7645-670d-51c718b66f6a@cumulusnetworks.com>
Date: Tue, 23 Aug 2016 12:54:41 -0600
From: David Ahern <dsa@...ulusnetworks.com>
To: Lorenzo Colitti <lorenzo@...gle.com>, netdev@...r.kernel.org
Cc: eric.dumazet@...il.com, davem@...emloft.net
Subject: Re: [PATCH net-next 2/2] net: diag: allow socket bytecode filters to
match socket marks
On 8/23/16 12:06 PM, Lorenzo Colitti wrote:
> @@ -713,10 +728,11 @@ static bool valid_markcond(const struct inet_diag_bc_op *op, int len,
> return len >= *min_len;
> }
>
> -static int inet_diag_bc_audit(struct nlattr *attr)
> +static int inet_diag_bc_audit(struct nlattr *attr, const struct sk_buff *skb)
> {
> const void *bytecode, *bc;
> int bytecode_len, len;
> + bool net_admin = netlink_net_capable(skb, CAP_NET_ADMIN);
>
> if (!attr || nla_len(attr) < sizeof(struct inet_diag_bc_op))
> return -EINVAL;
The net_admin arg should be added as the first local to maintain preference for reverse xmas tree order.
Powered by blists - more mailing lists