diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c index df9e623e3a8891c3d6c4d3c56602a7df0f87c27f..fb7b5c12d25321109f031a6cf88be5f26ad0c4ad 100644 --- a/src/network/lookup_name.c +++ b/src/network/lookup_name.c @@ -152,7 +152,8 @@ static int name_from_dns(struct address buf[static MAXADDRS], char canon[static if (ctx.cnt) return ctx.cnt; if (alens[0] < 4 || (abuf[0][3] & 15) == 2) return EAI_AGAIN; - if ((abuf[0][3] & 15) == 3) return EAI_NONAME; + if ((abuf[0][3] & 15) == 0) return EAI_NONAME; + if ((abuf[0][3] & 15) == 3) return 0; return EAI_FAIL; }