diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-01-31 18:46:52 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-31 18:48:26 -0800 |
commit | d930def27a433fc9f49ba094c9e9a667e4522aa7 (patch) | |
tree | 51f16b799d1a461250d1ece95fea8578844cef02 /pkg/tcpip/network | |
parent | c5e3c1c7bd5b7d1dc389fd93ac0cd56cdb4d9ac9 (diff) |
Default to NUD/neighborCache instead of linkAddrCache
This change flips gvisor to use Neighbor unreachability detection by
default to populate the neighbor table as defined by RFC 4861 section 7.
Although RFC 4861 is targeted at IPv6, the same algorithm is used for
link resolution on IPv4 networks using ARP.
Integrators may still use the legacy link address cache by setting
stack.Options.UseLinkAddrCache to true; stack.Options.UseNeighborCache
is now unused and will be removed.
A later change will remove linkAddrCache and associated code.
Updates #4658.
PiperOrigin-RevId: 354850531
Diffstat (limited to 'pkg/tcpip/network')
-rw-r--r-- | pkg/tcpip/network/ipv6/ndp_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/tcpip/network/ipv6/ndp_test.go b/pkg/tcpip/network/ipv6/ndp_test.go index e0245487b..8edaa9508 100644 --- a/pkg/tcpip/network/ipv6/ndp_test.go +++ b/pkg/tcpip/network/ipv6/ndp_test.go @@ -759,6 +759,7 @@ func TestNeighborAdvertisementWithTargetLinkLayerOption(t *testing.T) { t.Run(test.name, func(t *testing.T) { s := stack.New(stack.Options{ NetworkProtocols: []stack.NetworkProtocolFactory{NewProtocol}, + UseLinkAddrCache: true, }) e := channel.New(0, 1280, linkAddr0) e.LinkEPCapabilities |= stack.CapabilityResolutionRequired |