aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-27 16:56:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:18 -0400
commit73417f617a93cf30342c3ea41abc38927bd467aa (patch)
tree6093005afdca1825197758d851ca5f275d62356f /include
parentbe776281aee54626a474ba06f91926b98bdd180d (diff)
[NET] fib_rules: Flush route cache after rule modifications
The results of FIB rules lookups are cached in the routing cache except for IPv6 as no such cache exists. So far, it was the responsibility of the user to flush the cache after modifying any rules. This lead to many false bug reports due to misunderstanding of this concept. This patch automatically flushes the route cache after inserting or deleting a rule. Thanks to Muli Ben-Yehuda <muli@il.ibm.com> for catching a bug in the previous patch. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/fib_rules.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index 08bab8b6e575..ed3a8872c6ca 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -59,6 +59,10 @@ struct fib_rules_ops
59 u32 (*default_pref)(void); 59 u32 (*default_pref)(void);
60 size_t (*nlmsg_payload)(struct fib_rule *); 60 size_t (*nlmsg_payload)(struct fib_rule *);
61 61
62 /* Called after modifications to the rules set, must flush
63 * the route cache if one exists. */
64 void (*flush_cache)(void);
65
62 int nlgroup; 66 int nlgroup;
63 struct nla_policy *policy; 67 struct nla_policy *policy;
64 struct list_head *rules_list; 68 struct list_head *rules_list;