[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>
This commit is contained in:
committed by
David S. Miller
parent
687ad8cc64
commit
c454673da7
@ -274,11 +274,6 @@ nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
static int fib4_rule_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
{
|
||||
return fib_rules_dump(skb, cb, AF_INET);
|
||||
}
|
||||
|
||||
static u32 fib4_rule_default_pref(void)
|
||||
{
|
||||
struct list_head *pos;
|
||||
@ -327,6 +322,4 @@ void __init fib4_rules_init(void)
|
||||
list_add_tail(&default_rule.common.list, &fib4_rules);
|
||||
|
||||
fib_rules_register(&fib4_rules_ops);
|
||||
|
||||
rtnl_register(PF_INET, RTM_GETRULE, NULL, fib4_rule_dump);
|
||||
}
|
||||
|
Reference in New Issue
Block a user