summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-29 16:51:47 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-29 16:51:47 +0000
commit8d715bf4ef9846f340ef64dbe25ee643bf23cb90 (patch)
tree87690c72469605001f7158200405269d69870f7c
parentf2280a58b62bf7f468b44a1ab79910ca0c6cf9a3 (diff)
parent71623e40680c79e82390016a10376e73ff2370db (diff)
Merge release-20210125.0-26-g71623e406 (automated)
-rw-r--r--pkg/tcpip/network/ipv6/icmp.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/tcpip/network/ipv6/icmp.go b/pkg/tcpip/network/ipv6/icmp.go
index 43f8a825e..7298bd061 100644
--- a/pkg/tcpip/network/ipv6/icmp.go
+++ b/pkg/tcpip/network/ipv6/icmp.go
@@ -445,6 +445,17 @@ func (e *endpoint) handleICMP(pkt *stack.PacketBuffer, hasFragmentHeader bool) {
return
}
+ // As per RFC 4861 section 7.1.2:
+ // A node MUST silently discard any received Neighbor Advertisement
+ // messages that do not satisfy all of the following validity checks:
+ // ...
+ // - If the IP Destination Address is a multicast address the
+ // Solicited flag is zero.
+ if header.IsV6MulticastAddress(dstAddr) && na.SolicitedFlag() {
+ received.invalid.Increment()
+ return
+ }
+
// If the NA message has the target link layer option, update the link
// address cache with the link address for the target of the message.
if e.nud == nil {