|
@@ -212,23 +212,6 @@ nla_put_failure:
|
|
return -ENOBUFS;
|
|
return -ENOBUFS;
|
|
}
|
|
}
|
|
|
|
|
|
-static u32 dn_fib_rule_default_pref(struct fib_rules_ops *ops)
|
|
|
|
-{
|
|
|
|
- struct list_head *pos;
|
|
|
|
- struct fib_rule *rule;
|
|
|
|
-
|
|
|
|
- if (!list_empty(&dn_fib_rules_ops->rules_list)) {
|
|
|
|
- pos = dn_fib_rules_ops->rules_list.next;
|
|
|
|
- if (pos->next != &dn_fib_rules_ops->rules_list) {
|
|
|
|
- rule = list_entry(pos->next, struct fib_rule, list);
|
|
|
|
- if (rule->pref)
|
|
|
|
- return rule->pref - 1;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void dn_fib_rule_flush_cache(struct fib_rules_ops *ops)
|
|
static void dn_fib_rule_flush_cache(struct fib_rules_ops *ops)
|
|
{
|
|
{
|
|
dn_rt_cache_flush(-1);
|
|
dn_rt_cache_flush(-1);
|
|
@@ -243,7 +226,7 @@ static struct fib_rules_ops dn_fib_rules_ops_template = {
|
|
.configure = dn_fib_rule_configure,
|
|
.configure = dn_fib_rule_configure,
|
|
.compare = dn_fib_rule_compare,
|
|
.compare = dn_fib_rule_compare,
|
|
.fill = dn_fib_rule_fill,
|
|
.fill = dn_fib_rule_fill,
|
|
- .default_pref = dn_fib_rule_default_pref,
|
|
|
|
|
|
+ .default_pref = fib_default_rule_pref,
|
|
.flush_cache = dn_fib_rule_flush_cache,
|
|
.flush_cache = dn_fib_rule_flush_cache,
|
|
.nlgroup = RTNLGRP_DECnet_RULE,
|
|
.nlgroup = RTNLGRP_DECnet_RULE,
|
|
.policy = dn_fib_rule_policy,
|
|
.policy = dn_fib_rule_policy,
|