From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: netdev <netdev@vger.kernel.org>
Cc: Daniel Walton <dwalton@cumulusnetworks.com>
Subject: question on ipv6 support for duplicate nexthops
Date: Wed, 25 Jun 2014 14:40:03 -0700 [thread overview]
Message-ID: <53AB41B3.1020201@cumulusnetworks.com> (raw)
ipv4 allows duplicate nexthops. Multiple instances of same
nexthops maybe used to give higher weights to some nexthops
(though the "weight" attribute can be used for the same purpose).
ipv6 does not seem to support duplicate nexthops.
Example: The below ipv6 route is rejected by the kernel
#ip -6 route add 2001:10:1:3::/64 nexthop via 2001:10:1:2::99 nexthop
via 2001:10:1:2::99
The below patch points to the code that is preventing the addition of
duplicate nexthops.
I am not sure yet if there are other side effects to the patch below.
If there is interest in making ipv6 consistent with ipv4 for duplicate
nexthop handling, i can submit a patch.
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index cb4459b..afecc87 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -698,20 +698,6 @@ static int fib6_add_rt2node(struct fib6_node *fn,
struct rt6_info *rt,
break;
}
- if (iter->dst.dev == rt->dst.dev &&
- iter->rt6i_idev == rt->rt6i_idev &&
- ipv6_addr_equal(&iter->rt6i_gateway,
- &rt->rt6i_gateway)) {
- if (rt->rt6i_nsiblings)
- rt->rt6i_nsiblings = 0;
- if (!(iter->rt6i_flags & RTF_EXPIRES))
- return -EEXIST;
- if (!(rt->rt6i_flags & RTF_EXPIRES))
- rt6_clean_expires(iter);
- else
- rt6_set_expires(iter,
rt->dst.expires);
- return -EEXIST;
- }
/* If we have the same destination and the same
metric,
* but not the same gateway, then the route we
try to
* add is sibling to this route, increment our
counter
next reply other threads:[~2014-06-25 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 21:40 Roopa Prabhu [this message]
2014-06-27 7:15 ` question on ipv6 support for duplicate nexthops Hannes Frederic Sowa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53AB41B3.1020201@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=dwalton@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.