From c3d6fb85b2ed6a57b57b322a470b3b4eefb34fb7 Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Wed, 6 May 2015 13:58:54 +0200 Subject: 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 Signed-off-by: Richard Alpe Reviewed-by: Erik Hugne Reviewed-by: Ying Xue Signed-off-by: David S. Miller --- net/tipc/bearer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/tipc/bearer.c') diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 70e3dacbf84a..99c0bd43feed 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; -- cgit