MCPcopy Index your code
hub / github.com/tailscale/tailscale / removeSubnetAddress

Method removeSubnetAddress

wgengine/netstack/netstack.go:680–689  ·  view source on GitHub ↗
(ip netip.Addr)

Source from the content-addressed store, hash-verified

678}
679
680func (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
691func ipPrefixToAddressWithPrefix(ipp netip.Prefix) tcpip.AddressWithPrefix {
692 return tcpip.AddressWithPrefix{

Callers 2

acceptTCPMethod · 0.95
forwardUDPMethod · 0.95

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
AsSliceMethod · 0.45

Tested by

no test coverage detected