diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2015-05-06 13:58:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-09 16:40:02 -0400 |
commit | c3d6fb85b2ed6a57b57b322a470b3b4eefb34fb7 (patch) | |
tree | ff59ce5ff68dea45a2cbc8a78634fbc46296c363 /net/tipc/bearer.c | |
parent | c035e183ebfe6905dd0d31f7fe356cc3cfe00893 (diff) | |
download | op-kernel-dev-c3d6fb85b2ed6a57b57b322a470b3b4eefb34fb7.zip op-kernel-dev-c3d6fb85b2ed6a57b57b322a470b3b4eefb34fb7.tar.gz |
tipc: fix default link prop regression in nl compat
Default link properties can be set for media or bearer. This
functionality was missed when introducing the NL compatibility layer.
This patch implements this functionality in the compat netlink
layer. It works the same way as it did in the old API. We search for
media and bearers matching the "link name". If we find a matching
media or bearer the link tolerance, priority or window is used as
default for new links on that media or bearer.
Fixes: 37e2d4843f9e (tipc: convert legacy nl link prop set to nl compat)
Reported-by: Tomi Ollila <tomi.ollila@iki.fi>
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 70e3dac..99c0bd4 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -812,7 +812,7 @@ int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info) char *name; struct tipc_bearer *b; struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1]; - struct net *net = genl_info_net(info); + struct net *net = sock_net(skb->sk); if (!info->attrs[TIPC_NLA_BEARER]) return -EINVAL; |