diff options
author | paolomonti <paolo.monti@inwind.it> | 2024-12-20 11:02:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-20 11:02:09 +0100 |
commit | 3b602e73ba42e4b3b733fe533b6792354ac52d45 (patch) | |
tree | 3fc596708569b1a1e0927c54389f48336154f9a8 /src/lib | |
parent | b2c2453392466088940efa666e311df1dd95a827 (diff) |
IPv6: fix bad ipv6 format (#1890) (#2651)
ipv6 addresses already containing "::" token shall
not be searched for ":0:" nor patched
Close #1890
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ndpi_utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 70dea04ee..5df42a13c 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -918,6 +918,9 @@ char* ndpi_ssl_version2str(char *buf, int buf_len, void ndpi_patchIPv6Address(char *str) { int i = 0, j = 0; + if (strstr(str, "::")) + return; + while(str[i] != '\0') { if((str[i] == ':') && (str[i+1] == '0') |