[PKT_SCHED] cls: Use rtnl registration interface
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
be577ddc2b
commit
82623c0d73
|
@ -29,7 +29,6 @@
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kmod.h>
|
#include <linux/kmod.h>
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
@ -616,18 +615,11 @@ rtattr_failure: __attribute__ ((unused))
|
||||||
|
|
||||||
static int __init tc_filter_init(void)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue