Skip to content

Commit

Permalink
Fix remote port information in plugins
Browse files Browse the repository at this point in the history
The remote port was not properly propagated to the plugin through grpc.

Signed-off-by: Nikos Tsipinakis <nikos@tsipinakis.com>
  • Loading branch information
tsipinakis authored and naphelps committed Apr 26, 2024
1 parent f8dbc4b commit 74c2ddd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/plugin/pb/translation.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ func LogicalConnectionToProtoConnection(c *logical.Connection) *Connection {

return &Connection{
RemoteAddr: c.RemoteAddr,
RemotePort: int32(c.RemotePort),
ConnectionState: TLSConnectionStateToProtoConnectionState(c.ConnState),
}
}
Expand All @@ -341,6 +342,7 @@ func ProtoConnectionToLogicalConnection(c *Connection) (*logical.Connection, err

return &logical.Connection{
RemoteAddr: c.RemoteAddr,
RemotePort: int(c.RemotePort),
ConnState: cs,
}, nil
}
Expand Down

0 comments on commit 74c2ddd

Please sign in to comment.