mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Tunnel decapsulation bugfix when FlipRoles is called.
If FlipRoles() is called the conn_val in Conn.cc gets Unref'ed and thus my tunnel_partent RecordVal was lost. Fixing this.
This commit is contained in:
parent
ae1eb5379b
commit
08dc84a250
5 changed files with 64 additions and 37 deletions
|
@ -1018,11 +1018,8 @@ Connection* NetSessions::NewConn(HashKey* k, double t, const ConnID* id,
|
|||
int src_h = ntohs(id->src_port);
|
||||
int dst_h = ntohs(id->dst_port);
|
||||
int flags = 0;
|
||||
RecordVal *tunnel_parent = 0;
|
||||
TunnelParent *tunnel_parent = 0;
|
||||
|
||||
if ( tunnel_info )
|
||||
tunnel_parent = tunnel_info->GetRecordVal();
|
||||
|
||||
// Hmm... This is not great.
|
||||
TransportProto tproto;
|
||||
switch ( proto ) {
|
||||
|
@ -1068,6 +1065,9 @@ Connection* NetSessions::NewConn(HashKey* k, double t, const ConnID* id,
|
|||
id = &flip_id;
|
||||
}
|
||||
|
||||
if ( tunnel_info )
|
||||
tunnel_parent = new TunnelParent(&(tunnel_info->parent));
|
||||
|
||||
Connection* conn = new Connection(this, k, t, id, tunnel_parent);
|
||||
conn->SetTransport(tproto);
|
||||
dpm->BuildInitialAnalyzerTree(tproto, conn, data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue