X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/4f07f38374f8662c318699fb30432273ffcfe0d3..3857519629ca8fbcf3466c3fc761a5bb6ed32d53:/src/src/expand.c diff --git a/src/src/expand.c b/src/src/expand.c index 1d0ddec2a..40cc8d73a 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -2763,9 +2763,17 @@ switch(cond_type = identify_operator(&s, &opname)) case ECOND_ISIP: case ECOND_ISIP4: case ECOND_ISIP6: - rc = string_is_ip_address(sub[0], NULL); - *yield = ((cond_type == ECOND_ISIP)? (rc != 0) : - (cond_type == ECOND_ISIP4)? (rc == 4) : (rc == 6)) == testfor; + { + const uschar *errp; + const uschar **errpp; + DEBUG(D_expand) errpp = &errp; else errpp = 0; + if (0 == (rc = string_is_ip_addressX(sub[0], NULL, errpp))) + DEBUG(D_expand) debug_printf("failed: %s\n", errp); + + *yield = ( cond_type == ECOND_ISIP ? rc != 0 : + cond_type == ECOND_ISIP4 ? rc == 4 : rc == 6) == testfor; + } + break; /* Various authentication tests - all optionally compiled */