diff --git a/netquery/database.go b/netquery/database.go index 966f4090..ed1dcd8b 100644 --- a/netquery/database.go +++ b/netquery/database.go @@ -95,8 +95,7 @@ type ( ExitNode *string `sqlite:"exit_node"` // 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 ProfileName string `sqlite:"profile_name"` diff --git a/netquery/manager.go b/netquery/manager.go index cc6e5056..8bd1e5cd 100644 --- a/netquery/manager.go +++ b/netquery/manager.go @@ -204,7 +204,6 @@ func convertConnection(conn *network.Connection) (*Conn, error) { extraData["tunnel"] = conn.TunnelContext exitNode := conn.TunnelContext.GetExitNodeID() c.ExitNode = &exitNode - c.SPNUsed = true } if conn.DNSContext != nil { diff --git a/network/connection.go b/network/connection.go index 57ad93d7..bf652144 100644 --- a/network/connection.go +++ b/network/connection.go @@ -134,7 +134,8 @@ type Connection struct { //nolint:maligned // TODO: fix alignment // be changed during the lifetime of a connection and must be guarded // using the connection lock. 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 // Encrypted is currently unused and MUST be ignored. Encrypted bool