diff options
author | Luca <deri@ntop.org> | 2019-12-29 08:07:35 +0100 |
---|---|---|
committer | Luca <deri@ntop.org> | 2019-12-29 08:07:35 +0100 |
commit | 257ec7cc5f372d26cba1a7178589a085116f54b0 (patch) | |
tree | e7f4b68288389419ffb69830a8bfc0bd2dac4b82 /src/lib/protocols/http.c | |
parent | 73c7ccdb65a1e13e3fb1726af7882dd34534906f (diff) |
Removed disable_metadata_export preference that is no longer useful
since ndpi_process_extra_packet() can drive limited or full metadata export
Diffstat (limited to 'src/lib/protocols/http.c')
-rw-r--r-- | src/lib/protocols/http.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 70ca0c389..b599b82a9 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -149,9 +149,8 @@ static void setHttpUserAgent(struct ndpi_detection_module_struct *ndpi_struct, * https://github.com/ua-parser/uap-core/blob/master/regexes.yaml */ //printf("==> %s\n", ua); - if(!ndpi_struct->disable_metadata_export) { - snprintf((char*)flow->protos.http.detected_os, sizeof(flow->protos.http.detected_os), "%s", ua); - } + snprintf((char*)flow->protos.http.detected_os, + sizeof(flow->protos.http.detected_os), "%s", ua); } /* ************************************************************* */ @@ -333,21 +332,17 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ packet->host_line.len, packet->host_line.ptr); /* Copy result for nDPI apps */ - if(!ndpi_struct->disable_metadata_export) { - len = ndpi_min(packet->host_line.len, sizeof(flow->host_server_name)-1); - strncpy((char*)flow->host_server_name, (char*)packet->host_line.ptr, len); - flow->host_server_name[len] = '\0'; - flow->extra_packets_func = NULL; /* We're good now */ - } + len = ndpi_min(packet->host_line.len, sizeof(flow->host_server_name)-1); + strncpy((char*)flow->host_server_name, (char*)packet->host_line.ptr, len); + flow->host_server_name[len] = '\0'; + flow->extra_packets_func = NULL; /* We're good now */ flow->server_id = flow->dst; if(packet->forwarded_line.ptr) { len = ndpi_min(packet->forwarded_line.len, sizeof(flow->protos.http.nat_ip)-1); - if(!ndpi_struct->disable_metadata_export) { - strncpy((char*)flow->protos.http.nat_ip, (char*)packet->forwarded_line.ptr, len); - flow->protos.http.nat_ip[len] = '\0'; - } + strncpy((char*)flow->protos.http.nat_ip, (char*)packet->forwarded_line.ptr, len); + flow->protos.http.nat_ip[len] = '\0'; } ndpi_http_parse_subprotocol(ndpi_struct, flow); |