diff --git a/src/sn_utils.c b/src/sn_utils.c index 01b7fb0..1d7409f 100644 --- a/src/sn_utils.c +++ b/src/sn_utils.c @@ -816,13 +816,16 @@ static int process_udp(n2n_sn_t * sss, existance (better from the security standpoint) */ - HASH_ITER(hh, sss->rules, re, tmp_re) { - allowed_match = re_matchp(re->rule, cmn.community, &match_length); - if( (allowed_match != -1) - && (match_length == strlen(cmn.community)) // --- only full matches allowed (remove, if also partial matches wanted) - && (allowed_match == 0)) { // --- only full matches allowed (remove, if also partial matches wanted) - match = 1; - break; + if (!comm) { + HASH_ITER(hh, sss->rules, re, tmp_re) { + allowed_match = re_matchp(re->rule, cmn.community, &match_length); + + if( (allowed_match != -1) + && (match_length == strlen(cmn.community)) // --- only full matches allowed (remove, if also partial matches wanted) + && (allowed_match == 0)) { // --- only full matches allowed (remove, if also partial matches wanted) + match = 1; + break; + } } }