]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/decnet/dn_rules.c
[NET] fib_rules: Flush route cache after rule modifications
[net-next-2.6.git] / net / decnet / dn_rules.c
index a7a7da9b35c393bd43bd3c367e6de1f480e4a8e0..7f58b95b27d1e00725d140c701cdb3d1cb408068 100644 (file)
@@ -31,6 +31,7 @@
 #include <net/dn_fib.h>
 #include <net/dn_neigh.h>
 #include <net/dn_dev.h>
+#include <net/dn_route.h>
 
 static struct fib_rules_ops dn_fib_rules_ops;
 
@@ -239,9 +240,9 @@ static u32 dn_fib_rule_default_pref(void)
        return 0;
 }
 
-static int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
+static void dn_fib_rule_flush_cache(void)
 {
-       return fib_rules_dump(skb, cb, AF_DECnet);
+       dn_rt_cache_flush(0);
 }
 
 static struct fib_rules_ops dn_fib_rules_ops = {
@@ -254,6 +255,7 @@ static struct fib_rules_ops dn_fib_rules_ops = {
        .compare        = dn_fib_rule_compare,
        .fill           = dn_fib_rule_fill,
        .default_pref   = dn_fib_rule_default_pref,
+       .flush_cache    = dn_fib_rule_flush_cache,
        .nlgroup        = RTNLGRP_DECnet_RULE,
        .policy         = dn_fib_rule_policy,
        .rules_list     = &dn_fib_rules,
@@ -264,12 +266,10 @@ void __init dn_fib_rules_init(void)
 {
        list_add_tail(&default_rule.common.list, &dn_fib_rules);
        fib_rules_register(&dn_fib_rules_ops);
-       rtnl_register(PF_DECnet, RTM_GETRULE, NULL, dn_fib_dump_rules);
 }
 
 void __exit dn_fib_rules_cleanup(void)
 {
-       rtnl_unregister(PF_DECnet, RTM_GETRULE);
        fib_rules_unregister(&dn_fib_rules_ops);
 }