aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorToni <matzeton@googlemail.com>2022-06-16 09:16:18 +0200
committerGitHub <noreply@github.com>2022-06-16 09:16:18 +0200
commit20a29c393f5cff3864a75070b2988fe1be1c6d17 (patch)
tree2c707abe2f816262e41a63eadda60fe13ba86789 /src/lib/ndpi_main.c
parentc43360f8e65d9caa590070c5fa7211be63e6b408 (diff)
Improved IPSec/ISAKMP detection. (#1600)
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index de9d53350..83a0cb7ab 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -1283,8 +1283,8 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"STUN", NDPI_PROTOCOL_CATEGORY_NETWORK,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 3478, 0, 0, 0, 0) /* UDP */);
- ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IP_IPSEC,
- "IPsec", NDPI_PROTOCOL_CATEGORY_VPN,
+ ndpi_set_proto_defaults(ndpi_str, 0 /* encrypted */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IPSEC,
+ "IPSec", NDPI_PROTOCOL_CATEGORY_VPN,
ndpi_build_default_ports(ports_a, 500, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 500, 4500, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_GRE,
@@ -3140,7 +3140,7 @@ u_int16_t ndpi_guess_protocol_id(struct ndpi_detection_module_struct *ndpi_str,
switch(proto) {
case NDPI_IPSEC_PROTOCOL_ESP:
case NDPI_IPSEC_PROTOCOL_AH:
- return(NDPI_PROTOCOL_IP_IPSEC);
+ return(NDPI_PROTOCOL_IPSEC);
break;
case NDPI_GRE_PROTOCOL_TYPE:
return(NDPI_PROTOCOL_IP_GRE);
@@ -4421,6 +4421,9 @@ static int ndpi_callback_init(struct ndpi_detection_module_struct *ndpi_str) {
/* RSH */
init_rsh_dissector(ndpi_str, &a, detection_bitmask);
+ /* IPsec */
+ init_ipsec_dissector(ndpi_str, &a, detection_bitmask);
+
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_main_init.c"
#endif