summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-22 11:56:22 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:27:10 -0700
commit82623c0d73bd111cad26e501e509966b2455b0e0 (patch)
tree9b7b125e4c6a26720826de4bfe593199ee71bc93
parentbe577ddc2b4aca0849f701222f5bc13cf1b79c9a (diff)
downloadlinux-rpi3-82623c0d73bd111cad26e501e509966b2455b0e0.tar.gz
linux-rpi3-82623c0d73bd111cad26e501e509966b2455b0e0.tar.bz2
linux-rpi3-82623c0d73bd111cad26e501e509966b2455b0e0.zip
[PKT_SCHED] cls: Use rtnl registration interface
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/cls_api.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 3d0a6cdcaebc..ca3da5013b7a 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -29,7 +29,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 <linux/netlink.h>
@@ -616,18 +615,11 @@ rtattr_failure: __attribute__ ((unused))
static int __init tc_filter_init(void)
{
- struct rtnetlink_link *link_p = rtnetlink_links[PF_UNSPEC];
+ rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL);
+ rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL);
+ rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter,
+ tc_dump_tfilter);
- /* Setup rtnetlink links. It is made here to avoid
- exporting large number of public symbols.
- */
-
- if (link_p) {
- link_p[RTM_NEWTFILTER-RTM_BASE].doit = tc_ctl_tfilter;
- link_p[RTM_DELTFILTER-RTM_BASE].doit = tc_ctl_tfilter;
- link_p[RTM_GETTFILTER-RTM_BASE].doit = tc_ctl_tfilter;
- link_p[RTM_GETTFILTER-RTM_BASE].dumpit = tc_dump_tfilter;
- }
return 0;
}