summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index c6f1195366..271dc7f549 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1686,7 +1686,8 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
}
/* Write the exit policy to the end of 's'. */
- if (dns_seems_to_be_broken()) {
+ if (dns_seems_to_be_broken() ||
+ !router->exit_policy || !smartlist_len(router->exit_policy)) {
/* DNS is screwed up; don't claim to be an exit. */
strlcat(s+written, "reject *:*\n", maxlen-written);
written += strlen("reject *:*\n");