diff options
author | Thomas Graf <tgraf@suug.ch> | 2007-03-26 02:24:24 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:17 -0400 |
commit | c454673da7c1d6533f40ec2f788023df9af56ebf (patch) | |
tree | 004d329e049f3bdef09ff20623e24cba9f1fac12 /net/ipv6/fib6_rules.c | |
parent | 687ad8cc640fd1f1619cc44a9ab274dabd48c758 (diff) |
[NET] rules: Unified rules dumping
Implements a unified, protocol independant rules dumping function
which is capable of both, dumping a specific protocol family or
all of them. This speeds up dumping as less lookups are required.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/fib6_rules.c')
-rw-r--r-- | net/ipv6/fib6_rules.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index c74da4b6dd2f..dd9720e700ef 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -216,11 +216,6 @@ nla_put_failure: | |||
216 | return -ENOBUFS; | 216 | return -ENOBUFS; |
217 | } | 217 | } |
218 | 218 | ||
219 | static int fib6_rules_dump(struct sk_buff *skb, struct netlink_callback *cb) | ||
220 | { | ||
221 | return fib_rules_dump(skb, cb, AF_INET6); | ||
222 | } | ||
223 | |||
224 | static u32 fib6_rule_default_pref(void) | 219 | static u32 fib6_rule_default_pref(void) |
225 | { | 220 | { |
226 | return 0x3FFF; | 221 | return 0x3FFF; |
@@ -255,11 +250,9 @@ void __init fib6_rules_init(void) | |||
255 | list_add_tail(&main_rule.common.list, &fib6_rules); | 250 | list_add_tail(&main_rule.common.list, &fib6_rules); |
256 | 251 | ||
257 | fib_rules_register(&fib6_rules_ops); | 252 | fib_rules_register(&fib6_rules_ops); |
258 | __rtnl_register(PF_INET6, RTM_GETRULE, NULL, fib6_rules_dump); | ||
259 | } | 253 | } |
260 | 254 | ||
261 | void fib6_rules_cleanup(void) | 255 | void fib6_rules_cleanup(void) |
262 | { | 256 | { |
263 | rtnl_unregister(PF_INET6, RTM_GETRULE); | ||
264 | fib_rules_unregister(&fib6_rules_ops); | 257 | fib_rules_unregister(&fib6_rules_ops); |
265 | } | 258 | } |