mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
net: use rtnl_register_module where needed
all of these can be compiled as a module, so use new _module version to make sure module can no longer be removed while callback/dump is in use. Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e420251148
commit
c1c502b511
8 changed files with 55 additions and 32 deletions
|
|
@ -2510,12 +2510,15 @@ static int __init mpls_init(void)
|
|||
|
||||
rtnl_af_register(&mpls_af_ops);
|
||||
|
||||
rtnl_register(PF_MPLS, RTM_NEWROUTE, mpls_rtm_newroute, NULL, 0);
|
||||
rtnl_register(PF_MPLS, RTM_DELROUTE, mpls_rtm_delroute, NULL, 0);
|
||||
rtnl_register(PF_MPLS, RTM_GETROUTE, mpls_getroute, mpls_dump_routes,
|
||||
0);
|
||||
rtnl_register(PF_MPLS, RTM_GETNETCONF, mpls_netconf_get_devconf,
|
||||
mpls_netconf_dump_devconf, 0);
|
||||
rtnl_register_module(THIS_MODULE, PF_MPLS, RTM_NEWROUTE,
|
||||
mpls_rtm_newroute, NULL, 0);
|
||||
rtnl_register_module(THIS_MODULE, PF_MPLS, RTM_DELROUTE,
|
||||
mpls_rtm_delroute, NULL, 0);
|
||||
rtnl_register_module(THIS_MODULE, PF_MPLS, RTM_GETROUTE,
|
||||
mpls_getroute, mpls_dump_routes, 0);
|
||||
rtnl_register_module(THIS_MODULE, PF_MPLS, RTM_GETNETCONF,
|
||||
mpls_netconf_get_devconf,
|
||||
mpls_netconf_dump_devconf, 0);
|
||||
err = ipgre_tunnel_encap_add_mpls_ops();
|
||||
if (err)
|
||||
pr_err("Can't add mpls over gre tunnel ops\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue