[NET] rules: 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:
committed by
David S. Miller
parent
c8822a4e00
commit
9d9e6a5819
@@ -174,7 +174,7 @@ errout:
|
||||
return err;
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -265,7 +265,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;
|
||||
@@ -501,6 +501,10 @@ static struct notifier_block fib_rules_notifier = {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user