]> err.no Git - linux-2.6/commitdiff
[PKT_SCHED] act: Use rtnl registration interface
authorThomas Graf <tgraf@suug.ch>
Thu, 22 Mar 2007 18:56:59 +0000 (11:56 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:11 +0000 (22:27 -0700)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_api.c

index f002f74f37638ad3de62f77f782b4f5a03cf624e..711dd26c95c325a42937ba083f970c5d8b77b197 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
-#include <linux/rtnetlink.h>
 #include <linux/init.h>
 #include <linux/kmod.h>
 #include <net/sock.h>
@@ -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;
 }