On 8/23/16 12:06 PM, Lorenzo Colitti wrote:
quoted hunk ↗ jump to hunk
@@ -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.