From 4f51d6fc473465ef19771c99270b0a1432c0e8a5 Mon Sep 17 00:00:00 2001 From: Johanna Amann Date: Tue, 26 Jul 2016 11:45:11 -0700 Subject: [PATCH] Fix types when constructing SYN_packet record. The types used by the core did not match the types expected by the scripting framework, leading, e.g., to trouble with the logging framework. Discovered and fixed by Grant Moyer. Fixes BIT-1650 --- src/analyzer/protocol/tcp/TCP.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analyzer/protocol/tcp/TCP.cc b/src/analyzer/protocol/tcp/TCP.cc index 32b3790c59..17b99abb39 100644 --- a/src/analyzer/protocol/tcp/TCP.cc +++ b/src/analyzer/protocol/tcp/TCP.cc @@ -105,11 +105,11 @@ static RecordVal* build_syn_packet_val(int is_orig, const IP_Hdr* ip, v->Assign(0, new Val(is_orig, TYPE_BOOL)); v->Assign(1, new Val(int(ip->DF()), TYPE_BOOL)); - v->Assign(2, new Val(int(ip->TTL()), TYPE_INT)); - v->Assign(3, new Val((ip->TotalLen()), TYPE_INT)); - v->Assign(4, new Val(ntohs(tcp->th_win), TYPE_INT)); + v->Assign(2, new Val((ip->TTL()), TYPE_COUNT)); + v->Assign(3, new Val((ip->TotalLen()), TYPE_COUNT)); + v->Assign(4, new Val(ntohs(tcp->th_win), TYPE_COUNT)); v->Assign(5, new Val(winscale, TYPE_INT)); - v->Assign(6, new Val(MSS, TYPE_INT)); + v->Assign(6, new Val(MSS, TYPE_COUNT)); v->Assign(7, new Val(SACK, TYPE_BOOL)); return v;