]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: update Destination Cache entries when gateway turn into host
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Thu, 15 May 2014 07:56:14 +0000 (15:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 May 2014 03:26:27 +0000 (23:26 -0400)
commitbff5c112d4af8432b1d55b0c5f62b8de65185233
tree887779b523c3a19a0e7965b5bd6f29fd51ad809e
parent87352cd62d06db48b09bab1a43287dc2e335eb6f
ipv6: update Destination Cache entries when gateway turn into host

RFC 4861 states in 7.2.5:

The IsRouter flag in the cache entry MUST be set based on the
         Router flag in the received advertisement.  In those cases
         where the IsRouter flag changes from TRUE to FALSE as a result
         of this update, the node MUST remove that router from the
         Default Router List and update the Destination Cache entries
         for all destinations using that neighbor as a router as
         specified in Section 7.3.3.  This is needed to detect when a
         node that is used as a router stops forwarding packets due to
         being configured as a host.

Currently, when dealing with NA Message which IsRouter flag changes from
TRUE to FALSE, the kernel only removes router from the Default Router List,
and don't update the Destination Cache entries.

Now in order to update those Destination Cache entries, i introduce
function rt6_clean_tohost().

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h
net/ipv6/ndisc.c
net/ipv6/route.c