Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> Index: net-2.6.22/net/core/fib_rules.c =================================================================== --- net-2.6.22.orig/net/core/fib_rules.c 2007-03-22 12:48:05.000000000 +0100 +++ net-2.6.22/net/core/fib_rules.c 2007-03-22 12:52:34.000000000 +0100 @@ -152,7 +152,7 @@ out: EXPORT_SYMBOL_GPL(fib_rules_lookup); -int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) +static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) { struct fib_rule_hdr *frh = nlmsg_data(nlh); struct fib_rules_ops *ops = NULL; @@ -239,7 +239,7 @@ errout: return err; } -int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) +static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) { struct fib_rule_hdr *frh = nlmsg_data(nlh); struct fib_rules_ops *ops = NULL; @@ -471,6 +471,10 @@ static struct notifier_block fib_rules_n static int __init fib_rules_init(void) { + rtnl_register(PF_UNSPEC, RTM_NEWRULE, fib_nl_newrule, NULL); + rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL); + rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, rtnl_dump_all); + return register_netdevice_notifier(&fib_rules_notifier); } Index: net-2.6.22/include/net/fib_rules.h =================================================================== --- net-2.6.22.orig/include/net/fib_rules.h 2007-03-22 12:48:05.000000000 +0100 +++ net-2.6.22/include/net/fib_rules.h 2007-03-22 12:51:31.000000000 +0100 @@ -5,7 +5,7 @@ #include <linux/netdevice.h> #include <linux/fib_rules.h> #include <net/flow.h> -#include <net/netlink.h> +#include <net/rtnetlink.h> struct fib_rule { @@ -98,10 +98,6 @@ extern int fib_rules_lookup(struct fib struct flowi *, int flags, struct fib_lookup_arg *); -extern int fib_nl_newrule(struct sk_buff *, - struct nlmsghdr *, void *); -extern int fib_nl_delrule(struct sk_buff *, - struct nlmsghdr *, void *); extern int fib_rules_dump(struct sk_buff *, struct netlink_callback *, int); #endif Index: net-2.6.22/net/core/rtnetlink.c =================================================================== --- net-2.6.22.orig/net/core/rtnetlink.c 2007-03-22 12:49:47.000000000 +0100 +++ net-2.6.22/net/core/rtnetlink.c 2007-03-22 12:51:31.000000000 +0100 @@ -962,11 +962,6 @@ static struct rtnetlink_link link_rtnetl { [RTM_GETADDR - RTM_BASE] = { .dumpit = rtnl_dump_all }, [RTM_GETROUTE - RTM_BASE] = { .dumpit = rtnl_dump_all }, -#ifdef CONFIG_FIB_RULES - [RTM_NEWRULE - RTM_BASE] = { .doit = fib_nl_newrule }, - [RTM_DELRULE - RTM_BASE] = { .doit = fib_nl_delrule }, -#endif - [RTM_GETRULE - RTM_BASE] = { .dumpit = rtnl_dump_all }, }; static int rtnetlink_event(struct notifier_block *this, unsigned long event, void *ptr)
-- - 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