aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/soap.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/lib/protocols/soap.c b/src/lib/protocols/soap.c
index da8d10fef..8ba885974 100644
--- a/src/lib/protocols/soap.c
+++ b/src/lib/protocols/soap.c
@@ -27,7 +27,14 @@
static void ndpi_int_soap_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
{
- ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SOAP, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
+ if (flow->guessed_host_protocol_id == NDPI_PROTOCOL_HTTP)
+ {
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SOAP, NDPI_PROTOCOL_HTTP,
+ NDPI_CONFIDENCE_DPI);
+ } else {
+ ndpi_set_detected_protocol(ndpi_struct, flow, flow->guessed_host_protocol_id, NDPI_PROTOCOL_SOAP,
+ NDPI_CONFIDENCE_DPI);
+ }
}
void ndpi_search_soap(struct ndpi_detection_module_struct *ndpi_struct,
@@ -37,6 +44,25 @@ void ndpi_search_soap(struct ndpi_detection_module_struct *ndpi_struct,
NDPI_LOG_DBG(ndpi_struct, "search soap\n");
+ if (packet->parsed_lines == 0)
+ {
+ ndpi_parse_packet_line_info(ndpi_struct, flow);
+ }
+
+ if (packet->parsed_lines > 0)
+ {
+ size_t i;
+
+ for (i = 0; i < packet->parsed_lines && packet->line[i].len > 0; ++i)
+ {
+ if (LINE_STARTS(packet->line[i], "SOAPAction") != 0)
+ {
+ ndpi_int_soap_add_connection(ndpi_struct, flow);
+ return;
+ }
+ }
+ }
+
if (flow->packet_counter > 3)
{
if (flow->l4.tcp.soap_stage == 1)