Fix compilation and sync utests results
This commit is contained in:
@@ -1572,8 +1572,8 @@ struct ndpi_flow_struct {
|
||||
_Static_assert(sizeof(((struct ndpi_flow_struct *)0)->protos) <= 200,
|
||||
"Size of the struct member protocols increased to more than 200 bytes, "
|
||||
"please check if this change is necessary.");
|
||||
_Static_assert(sizeof(struct ndpi_flow_struct) <= 904,
|
||||
"Size of the flow struct increased to more than 904 bytes, "
|
||||
_Static_assert(sizeof(struct ndpi_flow_struct) <= 920,
|
||||
"Size of the flow struct increased to more than 920 bytes, "
|
||||
"please check if this change is necessary.");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -5277,7 +5277,7 @@ void ndpi_connection_tracking(struct ndpi_detection_module_struct *ndpi_str,
|
||||
const struct ndpi_tcphdr *tcph = packet->tcp;
|
||||
const struct ndpi_udphdr *udph = packet->udp;
|
||||
|
||||
if(packet->payload_packet_len > 0) {
|
||||
if(ndpi_str->max_payload_track_len > 0 && packet->payload_packet_len > 0) {
|
||||
/* printf("LEN: %u [%s]\n", packet->payload_packet_len, packet->payload); */
|
||||
|
||||
if(flow->flow_payload == NULL)
|
||||
|
||||
@@ -659,7 +659,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
|
||||
flow->http.url = ndpi_malloc(len);
|
||||
if(flow->http.url) {
|
||||
u_int offset = 0;
|
||||
u_int offset = 0, host_end = 0;
|
||||
|
||||
if(flow->detected_protocol_stack[0] == NDPI_PROTOCOL_HTTP_CONNECT) {
|
||||
strncpy(flow->http.url, (char*)packet->http_url_name.ptr,
|
||||
@@ -668,8 +668,10 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
flow->http.url[packet->http_url_name.len] = '\0';
|
||||
} else {
|
||||
/* Check if we pass through a proxy (usually there is also the Via: ... header) */
|
||||
if(strncmp((char*)packet->http_url_name.ptr, "http://", 7) != 0)
|
||||
if(strncmp((char*)packet->http_url_name.ptr, "http://", 7) != 0) {
|
||||
strncpy(flow->http.url, (char*)packet->host_line.ptr, offset = packet->host_line.len);
|
||||
host_end = packet->host_line.len;
|
||||
}
|
||||
|
||||
if((packet->host_line.len == packet->http_url_name.len)
|
||||
&& (strncmp((char*)packet->host_line.ptr,
|
||||
@@ -684,7 +686,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
||||
flow->http.url[offset] = '\0';
|
||||
}
|
||||
|
||||
ndpi_check_http_url(ndpi_struct, flow, &flow->http.url[packet->host_line.len]);
|
||||
ndpi_check_http_url(ndpi_struct, flow, &flow->http.url[host_end]);
|
||||
}
|
||||
|
||||
flow->http.method = ndpi_http_str2method((const char*)packet->http_method.ptr,
|
||||
|
||||
Reference in New Issue
Block a user