netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] net: ipv6: use common fib_default_rule_pref
@ 2015-09-02 13:03 Phil Sutter
  2015-09-02 18:34 ` David Miller
  2015-09-03 11:10 ` [net-next PATCH] net: kill default_pref field of struct fib_rules_ops Phil Sutter
  0 siblings, 2 replies; 12+ messages in thread
From: Phil Sutter @ 2015-09-02 13:03 UTC (permalink / raw)
  To: netdev; +Cc: tgraf, davem

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.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 net/ipv6/fib6_rules.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 2367a16..a859ad2 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -258,11 +258,6 @@ nla_put_failure:
 	return -ENOBUFS;
 }
 
-static u32 fib6_rule_default_pref(struct fib_rules_ops *ops)
-{
-	return 0x3FFF;
-}
-
 static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule)
 {
 	return nla_total_size(16) /* dst */
@@ -279,7 +274,7 @@ static const struct fib_rules_ops __net_initconst fib6_rules_ops_template = {
 	.configure		= fib6_rule_configure,
 	.compare		= fib6_rule_compare,
 	.fill			= fib6_rule_fill,
-	.default_pref		= fib6_rule_default_pref,
+	.default_pref		= fib_default_rule_pref,
 	.nlmsg_payload		= fib6_rule_nlmsg_payload,
 	.nlgroup		= RTNLGRP_IPV6_RULE,
 	.policy			= fib6_rule_policy,
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-09-09 21:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 13:03 [net-next PATCH] net: ipv6: use common fib_default_rule_pref Phil Sutter
2015-09-02 18:34 ` David Miller
2015-09-02 18:46   ` Thomas Graf
2015-09-03 11:10 ` [net-next PATCH] net: kill default_pref field of struct fib_rules_ops Phil Sutter
2015-09-06  5:00   ` David Miller
2015-09-06  9:54     ` Phil Sutter
2015-09-06 10:20     ` [net-next PATCH v2] net: ipv6: use common fib_default_rule_pref Phil Sutter
2015-09-09  5:37       ` David Miller
2015-09-09  5:38         ` David Miller
2015-09-09 11:45           ` Phil Sutter
2015-09-09 12:20             ` [net-next PATCH v3] " Phil Sutter
2015-09-09 21:22               ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).