]> bbs.cooldavid.org Git - net-next-2.6.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Sep 2010 16:43:13 +0000 (09:43 -0700)
commit65e9b62d4503849b10bedfc29bff0473760cc597
tree74fb61b4a345ed9ce022d21c4973c056c5516f08
parentbc8acf2c8c3e43fcc192762a9f964b3e9a17748b
ipv6: add special mode accept_ra=2 to accept RA while configured as router

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