Commit a3fde2ad authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

rtnetlink: ipv6: convert remaining users to rtnl_register_module

convert remaining users of rtnl_register to rtnl_register_module
and un-export rtnl_register.
Requested-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 112d59c7
...@@ -180,7 +180,7 @@ static inline int addrconf_finite_timeout(unsigned long timeout) ...@@ -180,7 +180,7 @@ static inline int addrconf_finite_timeout(unsigned long timeout)
*/ */
int ipv6_addr_label_init(void); int ipv6_addr_label_init(void);
void ipv6_addr_label_cleanup(void); void ipv6_addr_label_cleanup(void);
void ipv6_addr_label_rtnl_register(void); int ipv6_addr_label_rtnl_register(void);
u32 ipv6_addr_label(struct net *net, const struct in6_addr *addr, u32 ipv6_addr_label(struct net *net, const struct in6_addr *addr,
int type, int ifindex); int type, int ifindex);
......
...@@ -265,7 +265,6 @@ void rtnl_register(int protocol, int msgtype, ...@@ -265,7 +265,6 @@ void rtnl_register(int protocol, int msgtype,
pr_err("Unable to register rtnetlink message handler, " pr_err("Unable to register rtnetlink message handler, "
"protocol = %d, message type = %d\n", protocol, msgtype); "protocol = %d, message type = %d\n", protocol, msgtype);
} }
EXPORT_SYMBOL_GPL(rtnl_register);
/** /**
* rtnl_unregister - Unregister a rtnetlink message type * rtnl_unregister - Unregister a rtnetlink message type
......
...@@ -6627,7 +6627,9 @@ int __init addrconf_init(void) ...@@ -6627,7 +6627,9 @@ int __init addrconf_init(void)
RTNL_FLAG_DOIT_UNLOCKED); RTNL_FLAG_DOIT_UNLOCKED);
if (err < 0) if (err < 0)
goto errout; goto errout;
ipv6_addr_label_rtnl_register(); err = ipv6_addr_label_rtnl_register();
if (err < 0)
goto errout;
return 0; return 0;
errout: errout:
......
...@@ -547,12 +547,22 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh, ...@@ -547,12 +547,22 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh,
return err; return err;
} }
void __init ipv6_addr_label_rtnl_register(void) int __init ipv6_addr_label_rtnl_register(void)
{ {
rtnl_register(PF_INET6, RTM_NEWADDRLABEL, ip6addrlbl_newdel, int ret;
ret = rtnl_register_module(THIS_MODULE, PF_INET6, RTM_NEWADDRLABEL,
ip6addrlbl_newdel,
NULL, RTNL_FLAG_DOIT_UNLOCKED); NULL, RTNL_FLAG_DOIT_UNLOCKED);
rtnl_register(PF_INET6, RTM_DELADDRLABEL, ip6addrlbl_newdel, if (ret < 0)
return ret;
ret = rtnl_register_module(THIS_MODULE, PF_INET6, RTM_DELADDRLABEL,
ip6addrlbl_newdel,
NULL, RTNL_FLAG_DOIT_UNLOCKED); NULL, RTNL_FLAG_DOIT_UNLOCKED);
rtnl_register(PF_INET6, RTM_GETADDRLABEL, ip6addrlbl_get, if (ret < 0)
return ret;
ret = rtnl_register_module(THIS_MODULE, PF_INET6, RTM_GETADDRLABEL,
ip6addrlbl_get,
ip6addrlbl_dump, RTNL_FLAG_DOIT_UNLOCKED); ip6addrlbl_dump, RTNL_FLAG_DOIT_UNLOCKED);
return ret;
} }
...@@ -1425,10 +1425,13 @@ int __init ip6_mr_init(void) ...@@ -1425,10 +1425,13 @@ int __init ip6_mr_init(void)
goto add_proto_fail; goto add_proto_fail;
} }
#endif #endif
rtnl_register(RTNL_FAMILY_IP6MR, RTM_GETROUTE, NULL, err = rtnl_register_module(THIS_MODULE, RTNL_FAMILY_IP6MR, RTM_GETROUTE,
ip6mr_rtm_dumproute, 0); NULL, ip6mr_rtm_dumproute, 0);
if (err == 0)
return 0; return 0;
#ifdef CONFIG_IPV6_PIMSM_V2 #ifdef CONFIG_IPV6_PIMSM_V2
inet6_del_protocol(&pim6_protocol, IPPROTO_PIM);
add_proto_fail: add_proto_fail:
unregister_netdevice_notifier(&ip6_mr_notifier); unregister_netdevice_notifier(&ip6_mr_notifier);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment