mirror of
https://github.com/moby/moby.git
synced 2026-08-07 08:31:39 +00:00
Unmap IPv4 addresses loaded from store
When a endpoint's net.IPNet is loaded from store and converted to a netip.Addr, unmap it so that iptables rules don't contain IPv4-mapped IPv6 addresses. Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
@@ -1231,6 +1231,7 @@ func (d *driver) CreateEndpoint(ctx context.Context, nid, eid string, ifInfo dri
|
||||
func (ep *bridgeEndpoint) netipAddrs() (v4, v6 netip.Addr) {
|
||||
if ep.addr != nil {
|
||||
v4, _ = netip.AddrFromSlice(ep.addr.IP)
|
||||
v4 = v4.Unmap()
|
||||
}
|
||||
if ep.addrv6 != nil {
|
||||
v6, _ = netip.AddrFromSlice(ep.addrv6.IP)
|
||||
|
||||
Reference in New Issue
Block a user