Skip to content

Commit

Permalink
[PKT_SCHED] act: Use rtnl registration interface
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Graf <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tgraf authored and David S. Miller committed Apr 26, 2007
1 parent 82623c0 commit 708914c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -1077,14 +1076,9 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)

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;
}
Expand Down

0 comments on commit 708914c

Please sign in to comment.