Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>
Index: net-2.6.22/net/sched/cls_api.c
===================================================================
--- net-2.6.22.orig/net/sched/cls_api.c 2007-03-20 23:53:20.000000000 +0100
+++ net-2.6.22/net/sched/cls_api.c 2007-03-21 00:52:36.000000000 +0100
@@ -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>
@@ -128,7 +127,7 @@ static __inline__ u32 tcf_auto_prio(stru
/* Add/change/delete/get a filter node */
-static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
+static int nl_cls_modify(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
{
struct rtattr **tca;
struct tcmsg *t;
@@ -384,7 +383,7 @@ static int tcf_node_dump(struct tcf_prot
a->cb->nlh->nlmsg_seq, NLM_F_MULTI,
RTM_NEWTFILTER);
}
-static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
+static int nl_cls_dump(struct sk_buff *skb, struct netlink_callback *cb)
{
int t;
int s_t;
@@ -616,18 +615,10 @@ 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, nl_cls_modify, NULL);
+ rtnl_register(PF_UNSPEC, RTM_DELTFILTER, nl_cls_modify, NULL);
+ rtnl_register(PF_UNSPEC, RTM_GETTFILTER, nl_cls_modify, nl_cls_dump);
- /* 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;
}
--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html