diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-05-05 13:35:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 13:35:20 +0200 |
commit | 0223d3c4f5219910e0f7dc3c5f5b2c95df72dea7 (patch) | |
tree | 4151ba9dc3c2c6a82e8d6adda2b4e3486527a3aa /example/reader_util.c | |
parent | 02a2c804530e21f3fd9ba05e68009eb64b35ba1b (diff) |
HTTP: improve extraction of metadata and of flow risks (#1959)
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 18059f794..97b5cce7e 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1243,11 +1243,12 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl || is_ndpi_proto(flow, NDPI_PROTOCOL_HTTP_CONNECT)) { if(flow->ndpi_flow->http.url != NULL) { ndpi_snprintf(flow->http.url, sizeof(flow->http.url), "%s", flow->ndpi_flow->http.url); - flow->http.response_status_code = flow->ndpi_flow->http.response_status_code; - ndpi_snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : ""); - ndpi_snprintf(flow->http.server, sizeof(flow->http.server), "%s", flow->ndpi_flow->http.server ? flow->ndpi_flow->http.server : ""); - ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : ""); } + flow->http.response_status_code = flow->ndpi_flow->http.response_status_code; + ndpi_snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : ""); + ndpi_snprintf(flow->http.server, sizeof(flow->http.server), "%s", flow->ndpi_flow->http.server ? flow->ndpi_flow->http.server : ""); + ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : ""); + ndpi_snprintf(flow->http.nat_ip, sizeof(flow->http.nat_ip), "%s", flow->ndpi_flow->http.nat_ip ? flow->ndpi_flow->http.nat_ip : ""); } /* RTP */ else if(is_ndpi_proto(flow, NDPI_PROTOCOL_RTP)) { |