UDS: prevent crash when proxy udp (#3967)
* net: Prevent nil pointer err in NetAddr() * Fix dsworker saddr problem
This commit is contained in:
1 parent
ccc4b7b2cf
commit
057e6284b2
2 files changed
+8
-5
No files matched your search
@@ -464,7 +464,8 @@ func (w *dsWorker) callback(conn stat.Connection) {
|
||||
}
|
||||
}
|
||||
ctx = session.ContextWithInbound(ctx, &session.Inbound{
|
||||
Source: net.DestinationFromAddr(conn.RemoteAddr()),
|
||||
// Unix have no source addr, so we use gateway as source for log.
|
||||
Source: net.UnixDestination(w.address),
|
||||
Gateway: net.UnixDestination(w.address),
|
||||
Tag: w.tag,
|
||||
Conn: conn,
|
||||
|
||||
Reference in new issue
Block a user