[NET] rules: Use rtnl registration interface
[deliverable/linux.git] / net / core / fib_rules.c
index 7174ced75efcc99e6665f154407f758cfd313859..bf45f24cfea2c4f3c20a8b28114e1c7bf3df523a 100644 (file)
@@ -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);
 }
 
This page took 0.03124 seconds and 5 git commands to generate.