diff options
author | Philippe Antoine <contact@catenacyber.fr> | 2020-04-15 16:19:57 +0200 |
---|---|---|
committer | Philippe Antoine <contact@catenacyber.fr> | 2020-04-15 16:19:57 +0200 |
commit | cf47ba234a59db325a382db4bbdf10187f93eb9a (patch) | |
tree | 4e076a2b00f58f0ad95048175fff16c6381ee0a0 /src | |
parent | 98f2d3a73c0d4b09b1204e4cfc868ec258a3e478 (diff) |
Use ndpi_handle_ipv6_extension_headers in reader_util
Diffstat (limited to 'src')
-rw-r--r-- | src/include/ndpi_main.h | 4 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/include/ndpi_main.h b/src/include/ndpi_main.h index 9335f2151..f81e37c7c 100644 --- a/src/include/ndpi_main.h +++ b/src/include/ndpi_main.h @@ -150,6 +150,10 @@ extern "C" { #define ndpi_match_strprefix(payload, payload_len, str) \ ndpi_match_prefix((payload), (payload_len), (str), (sizeof(str)-1)) +#ifdef NDPI_DETECTION_SUPPORT_IPV6 + int ndpi_handle_ipv6_extension_headers(struct ndpi_detection_module_struct *ndpi_str, const u_int8_t ** l4ptr, u_int16_t * l4len, u_int8_t * nxt_hdr); +#endif + #ifdef __cplusplus } #endif diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 88b4fecaf..b0fbcf9b7 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -3645,7 +3645,7 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n * nxt_hdr: protocol of the actual payload * returns 0 upon success and 1 upon failure */ -static int ndpi_handle_ipv6_extension_headers(struct ndpi_detection_module_struct *ndpi_str, const u_int8_t ** l4ptr, u_int16_t * l4len, u_int8_t * nxt_hdr) +int ndpi_handle_ipv6_extension_headers(struct ndpi_detection_module_struct *ndpi_str, const u_int8_t ** l4ptr, u_int16_t * l4len, u_int8_t * nxt_hdr) { while((*nxt_hdr == 0 || *nxt_hdr == 43 || *nxt_hdr == 44 || *nxt_hdr == 60 || *nxt_hdr == 135 || *nxt_hdr == 59)) { u_int16_t ehdr_len; |