diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-01-29 16:09:14 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-29 16:10:49 -0800 |
commit | 45fe9fe9c6fa92954a5017b98835eac5fd8d3987 (patch) | |
tree | acfcdd6b5050d9100edeee6230aaf0dddb7014fe /pkg/tcpip/network/ipv4/ipv4.go | |
parent | 66aa6f3d4fb148145ab1b91c49f483d501185ff8 (diff) |
Clear IGMPv1 present flag on NIC down
This is dynamic state that can be re-learned when the NIC comes
back up.
Test: ipv4_test.TestIgmpV1Present
PiperOrigin-RevId: 354630921
Diffstat (limited to 'pkg/tcpip/network/ipv4/ipv4.go')
-rw-r--r-- | pkg/tcpip/network/ipv4/ipv4.go | 6 |
1 files changed, 6 insertions, 0 deletions
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") } |