diff options
author | Phil Sutter <phil@nwl.cc> | 2015-09-09 08:20:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-09 17:19:50 -0400 |
commit | f53de1e9a4aaf8cbe08845da6f7ff26a078ac507 (patch) | |
tree | 2a0c2dc9c5a8030bb53e4b42fd7a3d67bf49a328 /net/ipv6/fib6_rules.c | |
parent | 444c5f92ed152346aef0952316e0ea855129846c (diff) |
net: ipv6: use common fib_default_rule_pref
This switches IPv6 policy routing to use the shared
fib_default_rule_pref() function of IPv4 and DECnet. It is also used in
multicast routing for IPv4 as well as IPv6.
The motivation for this patch is a complaint about iproute2 behaving
inconsistent between IPv4 and IPv6 when adding policy rules: Formerly,
IPv6 rules were assigned a fixed priority of 0x3FFF whereas for IPv4 the
assigned priority value was decreased with each rule added.
Since then all users of the default_pref field have been converted to
assign the generic function fib_default_rule_pref(), fib_nl_newrule()
may just use it directly instead. Therefore get rid of the function
pointer altogether and make fib_default_rule_pref() static, as it's not
used outside fib_rules.c anymore.
Signed-off-by: Phil Sutter <phil@nwl.cc>
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 | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 2367a16eae58..9f777ec59a59 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -258,11 +258,6 @@ nla_put_failure: | |||
258 | return -ENOBUFS; | 258 | return -ENOBUFS; |
259 | } | 259 | } |
260 | 260 | ||
261 | static u32 fib6_rule_default_pref(struct fib_rules_ops *ops) | ||
262 | { | ||
263 | return 0x3FFF; | ||
264 | } | ||
265 | |||
266 | static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule) | 261 | static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule) |
267 | { | 262 | { |
268 | return nla_total_size(16) /* dst */ | 263 | return nla_total_size(16) /* dst */ |
@@ -279,7 +274,6 @@ static const struct fib_rules_ops __net_initconst fib6_rules_ops_template = { | |||
279 | .configure = fib6_rule_configure, | 274 | .configure = fib6_rule_configure, |
280 | .compare = fib6_rule_compare, | 275 | .compare = fib6_rule_compare, |
281 | .fill = fib6_rule_fill, | 276 | .fill = fib6_rule_fill, |
282 | .default_pref = fib6_rule_default_pref, | ||
283 | .nlmsg_payload = fib6_rule_nlmsg_payload, | 277 | .nlmsg_payload = fib6_rule_nlmsg_payload, |
284 | .nlgroup = RTNLGRP_IPV6_RULE, | 278 | .nlgroup = RTNLGRP_IPV6_RULE, |
285 | .policy = fib6_rule_policy, | 279 | .policy = fib6_rule_policy, |