From: Thomas Graf Date: Fri, 3 Sep 2010 03:04:20 +0000 (+0000) Subject: ipv6: add special mode forwarding=2 to send RS while X-Git-Tag: v2.6.35.14~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea626c8fccc5b119bf1d398d99e7ecad4bfc95e2;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: David S. Miller Signed-off-by: Andi Kleen --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index b5ab939d4d92d..5d59520ae162a 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)) {