Klaus Demo nginx / 70966c1
fix "PTR ." case in address resolver Igor Sysoev 12 years ago
2 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
19011901 return NGX_OK;
19021902 }
19031903
1904 if (len == -1) {
1905 name->len = 0;
1906 name->data = NULL;
1907 return NGX_OK;
1908 }
1909
19041910 dst = ngx_resolver_alloc(r, len);
19051911 if (dst == NULL) {
19061912 return NGX_ERROR;
123123 return;
124124 }
125125
126 if (ctx->name.len == 0) {
127 ngx_log_error(NGX_LOG_ERR, c->log, 0,
128 "%V has been resolved to zero name", &c->addr_text);
129
130 s->host = smtp_unavailable;
131
132 ngx_resolve_addr_done(ctx);
133
134 ngx_mail_smtp_greeting(s, s->connection);
135
136 return;
137 }
138
126139 c->log->action = "in resolving client hostname";
127140
128141 s->host.data = ngx_pstrdup(c->pool, &ctx->name);