Re: [PATCH 2/6] netlink: have netlink per-protocol bind function return an error code.

2014-04-22 Thread Richard Guy Briggs
On 14/04/22, David Miller wrote: > From: Richard Guy Briggs > Date: Fri, 18 Apr 2014 13:34:06 -0400 > > > @@ -1449,6 +1453,26 @@ static int netlink_bind(struct socket *sock, struct > > sockaddr *addr, > > if (!nladdr->nl_groups && (nlk->groups == NULL || !(u32)nlk->groups[0])) > >

Re: [PATCH 2/6] netlink: have netlink per-protocol bind function return an error code.

2014-04-22 Thread David Miller
From: Richard Guy Briggs Date: Fri, 18 Apr 2014 13:34:06 -0400 > @@ -1449,6 +1453,26 @@ static int netlink_bind(struct socket *sock, struct > sockaddr *addr, > if (!nladdr->nl_groups && (nlk->groups == NULL || !(u32)nlk->groups[0])) > return 0; > > + if (nlk->netlink_bi

[PATCH 2/6] netlink: have netlink per-protocol bind function return an error code.

2014-04-18 Thread Richard Guy Briggs
Have the netlink per-protocol optional bind function return an int error code rather than void to signal a failure. This will enable netlink protocols to perform extra checks including capabilities and permissions verifications when updating memberships in multicast groups. In netlink_bind() and