mirror of
https://github.com/moby/moby.git
synced 2026-07-25 16:56:34 +00:00
When ProgramExternalConnectvity is called, the bridge driver works out whether it needs to add port bindings for an endpoint based on whether it was selected as the container's gateway. Remember whether IPv4/IPv6 bindings have been set up, as part of the endpoint's state. When ProgramExternalConnectivity is called again, use differences between that stored state and the newly requested state to decide whether to add bindings. Port binding state is not persisted, on live-restore port bindings are re-created (so, the initial state should always be that no port bindings are set up). Signed-off-by: Rob Murray <rob.murray@docker.com>