]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipv6: add special mode accept_ra=2 to accept RA while configured as router
authorThomas Graf <tgraf@infradead.org>
Fri, 3 Sep 2010 02:59:14 +0000 (02:59 +0000)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:42 +0000 (13:54 -0700)
commitfff22ebf8262a288e4541d69fd959d9f2d8e4cc7
tree02b71097dcd4119ee8e4c789783d8fd7089ed297
parent057192c2e12ff9a7d7f168913025106cf6ccbd8c
ipv6: add special mode accept_ra=2 to accept RA while configured as router

[ upstream commit 65e9b62d4503849b10bedfc29bff0473760cc597 ]

The current IPv6 behavior is to not accept router advertisements while
forwarding, i.e. configured as router.

This does make sense, a router is typically not supposed to be auto
configured. However there are exceptions and we should allow the
current behavior to be overwritten.

Therefore this patch enables the user to overrule the "if forwarding
enabled then don't listen to RAs" rule by setting accept_ra to the
special value of 2.

An alternative would be to ignore the forwarding switch alltogether
and solely accept RAs based on the value of accept_ra. However, I
found that if not intended, accepting RAs as a router can lead to
strange unwanted behavior therefore we it seems wise to only do so
if the user explicitely asks for this behavior.

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>
net/ipv6/ndisc.c