diff --git a/intra/common.go b/intra/common.go index 1e6c3e5a..377426d0 100644 --- a/intra/common.go +++ b/intra/common.go @@ -7,7 +7,6 @@ package intra import ( - "errors" "fmt" "math/rand" "net" @@ -26,10 +25,6 @@ const smmchSize = 24 // immediate is the wait time before sending a summary to the listener. var immediate = time.Duration(0) -var ( - errNoAddr = errors.New("nil addr") -) - // TODO: Propagate TCP RST using local.Abort(), on appropriate errors. func upload(cid string, local net.Conn, remote net.Conn, ioch chan<- ioinfo) { defer core.Recover(core.Exit11, "c.upload: "+cid) @@ -284,14 +279,6 @@ func splitCidPidUid(decision *Mark) (cid, pid, uid string) { return decision.CID, decision.PID, decision.UID } -func ipp(addr net.Addr) (netip.AddrPort, error) { - var zeroaddr = netip.AddrPort{} - if addr == nil || core.IsNil(addr) { - return zeroaddr, errNoAddr - } - return netip.ParseAddrPort(addr.String()) -} - func conn2str(a net.Conn, b net.Conn) string { ar := a.RemoteAddr() br := b.RemoteAddr() diff --git a/intra/udpmux.go b/intra/udpmux.go index a5401114..716b091b 100644 --- a/intra/udpmux.go +++ b/intra/udpmux.go @@ -434,7 +434,6 @@ type muxTable struct { } type assocFn func(net, dst string) (net.PacketConn, error) -type dissocFn func(src netip.AddrPort) func newMuxTable() *muxTable { return &muxTable{t: make(map[netip.AddrPort]*muxer)}