diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-12-10 00:03:21 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-10 00:03:21 +0000 |
commit | e9cf884608ab709c8659683a39c6c37f471ebe1d (patch) | |
tree | 0e75fb1d109c17ed077eede017252e4149cc4ba9 /pkg/tcpip/network/ipv6 | |
parent | 035bb867715302b714bf2b730c24e61c3d972546 (diff) | |
parent | 50189b0d6f2401f842f63ae149de13b89b4c30f9 (diff) |
Merge release-20201130.0-69-g50189b0d6 (automated)
Diffstat (limited to 'pkg/tcpip/network/ipv6')
-rw-r--r-- | pkg/tcpip/network/ipv6/mld.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/tcpip/network/ipv6/mld.go b/pkg/tcpip/network/ipv6/mld.go index 6face17c6..b67eafdba 100644 --- a/pkg/tcpip/network/ipv6/mld.go +++ b/pkg/tcpip/network/ipv6/mld.go @@ -40,6 +40,9 @@ type MLDOptions struct { // When enabled, MLD may transmit MLD report and done messages when // joining and leaving multicast groups respectively, and handle incoming // MLD packets. + // + // This field is ignored and is always assumed to be false for interfaces + // without neighbouring nodes (e.g. loopback). Enabled bool } @@ -72,7 +75,9 @@ func (mld *mldState) SendLeave(groupAddress tcpip.Address) *tcpip.Error { func (mld *mldState) init(ep *endpoint) { mld.ep = ep mld.genericMulticastProtocol.Init(&ep.mu.RWMutex, ip.GenericMulticastProtocolOptions{ - Enabled: ep.protocol.options.MLD.Enabled, + // No need to perform MLD on loopback interfaces since they don't have + // neighbouring nodes. + Enabled: ep.protocol.options.MLD.Enabled && !mld.ep.nic.IsLoopback(), Rand: ep.protocol.stack.Rand(), Clock: ep.protocol.stack.Clock(), Protocol: mld, |