(ip netip.Addr)
| 678 | } |
| 679 | |
| 680 | func (ns *Impl) removeSubnetAddress(ip netip.Addr) { |
| 681 | ns.mu.Lock() |
| 682 | defer ns.mu.Unlock() |
| 683 | ns.connsOpenBySubnetIP[ip]-- |
| 684 | // Only unregister address from netstack after last concurrent connection. |
| 685 | if ns.connsOpenBySubnetIP[ip] == 0 { |
| 686 | ns.ipstack.RemoveAddress(nicID, tcpip.AddrFromSlice(ip.AsSlice())) |
| 687 | delete(ns.connsOpenBySubnetIP, ip) |
| 688 | } |
| 689 | } |
| 690 | |
| 691 | func ipPrefixToAddressWithPrefix(ipp netip.Prefix) tcpip.AddressWithPrefix { |
| 692 | return tcpip.AddressWithPrefix{ |
no test coverage detected