mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
apply patch from lodger to simplify code a bit
svn:r14474
This commit is contained in:
parent
4fa1c69c44
commit
5ad9dc2244
@ -549,11 +549,12 @@ dns_resolve(edge_connection_t *exitconn)
|
|||||||
or_circuit_t *oncirc = TO_OR_CIRCUIT(exitconn->on_circuit);
|
or_circuit_t *oncirc = TO_OR_CIRCUIT(exitconn->on_circuit);
|
||||||
int is_resolve, r;
|
int is_resolve, r;
|
||||||
char *hostname = NULL;
|
char *hostname = NULL;
|
||||||
routerinfo_t *me = router_get_my_routerinfo();
|
routerinfo_t *me;
|
||||||
is_resolve = exitconn->_base.purpose == EXIT_PURPOSE_RESOLVE;
|
is_resolve = exitconn->_base.purpose == EXIT_PURPOSE_RESOLVE;
|
||||||
|
|
||||||
if (is_resolve && me &&
|
if (is_resolve &&
|
||||||
policy_is_reject_star(me->exit_policy)) /* non-exit */
|
(!(me = router_get_my_routerinfo()) ||
|
||||||
|
policy_is_reject_star(me->exit_policy))) /* non-exit */
|
||||||
r = -1;
|
r = -1;
|
||||||
else
|
else
|
||||||
r = dns_resolve_impl(exitconn, is_resolve, oncirc, &hostname);
|
r = dns_resolve_impl(exitconn, is_resolve, oncirc, &hostname);
|
||||||
|
Loading…
Reference in New Issue
Block a user