Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1472 from openziti/fix-udp-addresses
Browse files Browse the repository at this point in the history
Report correct local/remote addresses for intercepted UDP conns. Fixes #1471
  • Loading branch information
plorenz authored May 9, 2023
2 parents 116fa37 + ec994e5 commit fa4a1a1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tunnel/udp_vconn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ func (conn *udpConn) Accept(buffer mempool.PooledBuffer) {
}
}

func (conn *udpConn) Network() string {
return "ziti"
}

func (conn *udpConn) String() string {
return conn.service
}

func (conn *udpConn) markUsed() {
conn.lastUse.Store(time.Now())
}
Expand Down Expand Up @@ -174,11 +166,11 @@ func (conn *udpConn) Close() error {
}

func (conn *udpConn) LocalAddr() net.Addr {
return conn.srcAddr
return conn.writeConn.LocalAddr()
}

func (conn *udpConn) RemoteAddr() net.Addr {
return conn
return conn.srcAddr
}

func (conn *udpConn) SetDeadline(time.Time) error {
Expand Down

0 comments on commit fa4a1a1

Please sign in to comment.