Removed duplicated field SPNUsed from netquery module

This commit is contained in:
Patrick Pacher
2022-08-02 08:58:06 +02:00
parent a7034e423c
commit 6c4faa3d3c
3 changed files with 3 additions and 4 deletions

View File

@@ -95,8 +95,7 @@ type (
ExitNode *string `sqlite:"exit_node"` ExitNode *string `sqlite:"exit_node"`
// TODO(ppacher): support "NOT" in search query to get rid of the following helper fields // TODO(ppacher): support "NOT" in search query to get rid of the following helper fields
SPNUsed bool `sqlite:"spn_used"` // could use "exit_node IS NOT NULL" or "exit IS NULL" Active bool `sqlite:"active"` // could use "ended IS NOT NULL" or "ended IS NULL"
Active bool `sqlite:"active"` // could use "ended IS NOT NULL" or "ended IS NULL"
// TODO(ppacher): we need to profile here for "suggestion" support. It would be better to keep a table of profiles in sqlite and use joins here // TODO(ppacher): we need to profile here for "suggestion" support. It would be better to keep a table of profiles in sqlite and use joins here
ProfileName string `sqlite:"profile_name"` ProfileName string `sqlite:"profile_name"`

View File

@@ -204,7 +204,6 @@ func convertConnection(conn *network.Connection) (*Conn, error) {
extraData["tunnel"] = conn.TunnelContext extraData["tunnel"] = conn.TunnelContext
exitNode := conn.TunnelContext.GetExitNodeID() exitNode := conn.TunnelContext.GetExitNodeID()
c.ExitNode = &exitNode c.ExitNode = &exitNode
c.SPNUsed = true
} }
if conn.DNSContext != nil { if conn.DNSContext != nil {

View File

@@ -134,7 +134,8 @@ type Connection struct { //nolint:maligned // TODO: fix alignment
// be changed during the lifetime of a connection and must be guarded // be changed during the lifetime of a connection and must be guarded
// using the connection lock. // using the connection lock.
Inspecting bool Inspecting bool
// Tunneled is currently unused and MUST be ignored. // Tunneled is set to true when the connection has been routed through the
// SPN.
Tunneled bool Tunneled bool
// Encrypted is currently unused and MUST be ignored. // Encrypted is currently unused and MUST be ignored.
Encrypted bool Encrypted bool