summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graf <tgraf@infradead.org>2010-09-03 03:04:20 +0000
committerAndi Kleen <ak@linux.intel.com>2011-08-01 13:55:04 -0700
commitea626c8fccc5b119bf1d398d99e7ecad4bfc95e2 (patch)
tree5fc829067f0c757b867fafdcef6bc3f17a9bb76f
parent22950d253543188b3e6488a0dbd5cad9eb71bef7 (diff)
downloadlwn-ea626c8fccc5b119bf1d398d99e7ecad4bfc95e2.tar.gz
lwn-ea626c8fccc5b119bf1d398d99e7ecad4bfc95e2.zip
ipv6: add special mode forwarding=2 to send RS while
[ upstream commit c3bccac2fa76f1619dfe4fb7b9bee69de7f066d8 ] configured as router Similar to accepting router advertisement, the IPv6 stack does not send router solicitations if forwarding is enabled. This patch enables this behavior to be overruled by setting forwarding to the special value 2. Signed-off-by: Thomas Graf <tgraf@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r--net/ipv6/addrconf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b5ab939d4d92..5d59520ae162 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2960,7 +2960,8 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp)
start sending router solicitations.
*/
- if (ifp->idev->cnf.forwarding == 0 &&
+ if ((ifp->idev->cnf.forwarding == 0 ||
+ ifp->idev->cnf.forwarding == 2) &&
ifp->idev->cnf.rtr_solicits > 0 &&
(dev->flags&IFF_LOOPBACK) == 0 &&
(ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {