diff options
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 3f472d7f1..ff4b0cb5d 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -1729,12 +1729,15 @@ static int ac_match_handler(AC_MATCH_t *m, AC_TEXT_t *txt, AC_REP_t *match) { to avoid matching aws.amazon.com whereas a.ws.amazon.com has to match */ - if((whatfound != buf) && (m->patterns->astring[0] != '.') /* The searched pattern does not start with . */ + if((whatfound != buf) + && (strchr(whatfound, '=') == NULL) /* This is not a match from tls_certificate_match[] */ + && (m->patterns->astring[0] != '.') /* The searched pattern does not start with . */ && strchr(m->patterns->astring, '.') /* The matched pattern has a . (e.g. numeric or sym IPs) */) { int len = strlen(m->patterns->astring); - if((whatfound[-1] != '.') || ((m->patterns->astring[len - 1] != '.') && - (whatfound[len] != '\0') /* endsWith does not hold here */)) { + if(((whatfound[-1] != '.') && (whatfound[0] != '-') && (whatfound[-1] != '-')) + || ((m->patterns->astring[len - 1] != '.') + && (whatfound[len] != '\0') /* endsWith does not hold here */)) { return(0); } else { memcpy(match, &m->patterns[0].rep, sizeof(AC_REP_t)); /* Partial match? */ |