ip6-nd: set router flag on NA if appropriate 82/37582/2
authorMatthew Smith <mgsmith@netgate.com>
Sat, 5 Nov 2022 18:33:08 +0000 (18:33 +0000)
committerDave Barach <openvpp@barachs.net>
Sun, 6 Nov 2022 12:48:15 +0000 (12:48 +0000)
commitce1ff6a9b1ab2c4ab74165b26c92c2d551f53cf8
treed8eaeb827bee743bc71e3a6f82c6f2ab70c2cad6
parentf094ce7653917b8c331a79c088ef63ea2679c40d
ip6-nd: set router flag on NA if appropriate

Type: fix

The router flag on a neighbor advertisement can be used by neighbors to
detect that a router has changed to a host (RFC 4861 section 4.4).

If a neighbor adds routes after receiving a router advertisement sent
by VPP and subsequently receives a neighbor advertisement sent by VPP,
it may remove any routes it added based on the RA if the NA does not
have the router flag set. It appears that this is how windows behaves.

When sending a neighbor advertisement, set the router flag if sending
RAs is enabled on the interface.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I1f3e42bbd8ea1a4c116b1ce5a8273652d4cd763d
src/vnet/ip6-nd/ip6_nd_inline.h
src/vnet/ip6-nd/ip6_ra.c
src/vnet/ip6-nd/ip6_ra.h