From: Thomas Graf Date: Thu, 22 Mar 2007 18:56:59 +0000 (-0700) Subject: [PKT_SCHED] act: Use rtnl registration interface X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~46503^2~216 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=708914cc5e1657eb1a1f9eefc6333dfd2df8c73a;p=mirror_ubuntu-focal-kernel.git [PKT_SCHED] act: Use rtnl registration interface Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/sched/act_api.c b/net/sched/act_api.c index f002f74f3763..711dd26c95c3 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -1077,14 +1076,9 @@ nlmsg_failure: static int __init tc_action_init(void) { - struct rtnetlink_link *link_p = rtnetlink_links[PF_UNSPEC]; - - if (link_p) { - link_p[RTM_NEWACTION-RTM_BASE].doit = tc_ctl_action; - link_p[RTM_DELACTION-RTM_BASE].doit = tc_ctl_action; - link_p[RTM_GETACTION-RTM_BASE].doit = tc_ctl_action; - link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action; - } + rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL); + rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL); + rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action); return 0; }