diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-30 00:28:45 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-30 00:28:45 +0000 |
commit | 6a0189d60eef85a96a5f39ae7fbe32e26ece235d (patch) | |
tree | f0b672d8a2dcdc8d6b521c752e8665316956dd1b /pkg | |
parent | 3e100e9a759610e178e3985543ae3d918b41a07f (diff) | |
parent | 45fe9fe9c6fa92954a5017b98835eac5fd8d3987 (diff) |
Merge release-20210125.0-35-g45fe9fe9c (automated)
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/tcpip/network/ipv4/igmp.go | 5 | ||||
-rw-r--r-- | pkg/tcpip/network/ipv4/ipv4.go | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/pkg/tcpip/network/ipv4/igmp.go b/pkg/tcpip/network/ipv4/igmp.go index 4cd0b3256..acc126c3b 100644 --- a/pkg/tcpip/network/ipv4/igmp.go +++ b/pkg/tcpip/network/ipv4/igmp.go @@ -215,6 +215,11 @@ func (igmp *igmpState) setV1Present(v bool) { } } +func (igmp *igmpState) resetV1Present() { + igmp.igmpV1Job.Cancel() + igmp.setV1Present(false) +} + // handleMembershipQuery handles a membership query. // // Precondition: igmp.ep.mu must be locked. diff --git a/pkg/tcpip/network/ipv4/ipv4.go b/pkg/tcpip/network/ipv4/ipv4.go index e5c80699d..b0703715a 100644 --- a/pkg/tcpip/network/ipv4/ipv4.go +++ b/pkg/tcpip/network/ipv4/ipv4.go @@ -229,6 +229,12 @@ func (e *endpoint) disableLocked() { panic(fmt.Sprintf("unexpected error when removing address = %s: %s", ipv4BroadcastAddr.Address, err)) } + // Reset the IGMP V1 present flag. + // + // If the node comes back up on the same network, it will re-learn that it + // needs to perform IGMPv1. + e.mu.igmp.resetV1Present() + if !e.setEnabled(false) { panic("should have only done work to disable the endpoint if it was enabled") } |