From 06ed9e329d46268cf12fe07bd3974c5d54ae7e0b Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Wed, 16 Oct 2019 22:53:20 -0700 Subject: Do Duplicate Address Detection on permanent IPv6 addresses. This change adds support for Duplicate Address Detection on IPv6 addresses as defined by RFC 4862 section 5.4. Note, this change will not break existing uses of netstack as the default configuration for the stack options is set in such a way that DAD will not be performed. See `stack.Options` and `stack.NDPConfigurations` for more details. Tests: Tests to make sure that the DAD process properly resolves or fails. That is, tests make sure that DAD resolves only if: - No other node is performing DAD for the same address - No other node owns the same address PiperOrigin-RevId: 275189471 --- pkg/tcpip/header/BUILD | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'pkg/tcpip/header/BUILD') diff --git a/pkg/tcpip/header/BUILD b/pkg/tcpip/header/BUILD index a255231a3..07d09abed 100644 --- a/pkg/tcpip/header/BUILD +++ b/pkg/tcpip/header/BUILD @@ -16,6 +16,9 @@ go_library( "ipv4.go", "ipv6.go", "ipv6_fragment.go", + "ndp_neighbor_advert.go", + "ndp_neighbor_solicit.go", + "ndp_options.go", "tcp.go", "udp.go", ], @@ -30,13 +33,19 @@ go_library( ) go_test( - name = "header_test", + name = "header_x_test", size = "small", srcs = [ "ipversion_test.go", "tcp_test.go", ], - deps = [ - ":header", - ], + deps = [":header"], +) + +go_test( + name = "header_test", + size = "small", + srcs = ["ndp_test.go"], + embed = [":header"], + deps = ["//pkg/tcpip"], ) -- cgit v1.2.3