diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-04-06 17:20:52 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-06 17:20:52 +0000 |
commit | 5f79ea8aa0f229e0f1e69b95b51d4f1c5cd42258 (patch) | |
tree | f396262c0197d75b15dad90600324b810139a202 /pkg/tcpip/network/ipv4 | |
parent | 5951e1a82befe3f9b39fd5f3400b65c494cc438a (diff) | |
parent | d7fd00bad1416fb44b3303331ee223c28c69fe9b (diff) |
Merge release-20210322.0-53-gd7fd00bad (automated)
Diffstat (limited to 'pkg/tcpip/network/ipv4')
-rw-r--r-- | pkg/tcpip/network/ipv4/igmp.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/tcpip/network/ipv4/igmp.go b/pkg/tcpip/network/ipv4/igmp.go index f3fc1c87e..b1ac29294 100644 --- a/pkg/tcpip/network/ipv4/igmp.go +++ b/pkg/tcpip/network/ipv4/igmp.go @@ -126,6 +126,17 @@ func (igmp *igmpState) SendLeave(groupAddress tcpip.Address) tcpip.Error { return err } +// ShouldPerformProtocol implements ip.MulticastGroupProtocol. +func (igmp *igmpState) ShouldPerformProtocol(groupAddress tcpip.Address) bool { + // As per RFC 2236 section 6 page 10, + // + // The all-systems group (address 224.0.0.1) is handled as a special + // case. The host starts in Idle Member state for that group on every + // interface, never transitions to another state, and never sends a + // report for that group. + return groupAddress != header.IPv4AllSystems +} + // init sets up an igmpState struct, and is required to be called before using // a new igmpState. // @@ -137,7 +148,6 @@ func (igmp *igmpState) init(ep *endpoint) { Clock: ep.protocol.stack.Clock(), Protocol: igmp, MaxUnsolicitedReportDelay: UnsolicitedReportIntervalMax, - AllNodesAddress: header.IPv4AllSystems, }) igmp.igmpV1Present = igmpV1PresentDefault igmp.igmpV1Job = ep.protocol.stack.NewJob(&ep.mu, func() { |