Thread (5 messages) flat view 5 messages, 4 authors, 2016-08-23

Re: [PATCH net-next 2/2] net: diag: allow socket bytecode filters to match socket marks

From: David Ahern <hidden>
Date: 2016-08-23 19:01:38

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help