|
|
| version 1.2, 2003/06/17 04:26:44 | version 1.3, 2004/04/13 21:53:43 |
|---|---|
| Line 33 | Line 33 |
| * @(#)res_query.c 8.1 (Berkeley) 6/4/93 | * @(#)res_query.c 8.1 (Berkeley) 6/4/93 |
| * $From: Id: res_query.c,v 8.14 1997/06/09 17:47:05 halley Exp $ | * $From: Id: res_query.c,v 8.14 1997/06/09 17:47:05 halley Exp $ |
| * $FreeBSD: src/lib/libc/net/res_query.c,v 1.19.2.2 2002/07/07 11:34:42 robert Exp $ | * $FreeBSD: src/lib/libc/net/res_query.c,v 1.19.2.2 2002/07/07 11:34:42 robert Exp $ |
| * $DragonFly: src/lib/libc/net/res_query.c,v 1.1 2003/06/16 04:30:56 dillon Exp $ | * $DragonFly$ |
| */ | */ |
| /* | /* |
| Line 270 res_search(name, class, type, answer, an | Line 270 res_search(name, class, type, answer, an |
| /* keep trying */ | /* keep trying */ |
| break; | break; |
| case TRY_AGAIN: | case TRY_AGAIN: |
| if (hp->rcode == SERVFAIL) { | /* |
| /* try next search element, if any */ | * This can occur due to a server failure |
| got_servfail++; | * (that is, all listed servers have failed), |
| break; | * or all listed servers have timed out. |
| } | * hp->rcode may not be set to SERVFAIL in the |
| * case of a timeout. | |
| * | |
| * Either way we must terminate the search | |
| * and return TRY_AGAIN in order to avoid | |
| * non-deterministic return codes. For | |
| * example, loaded name servers or races | |
| * against network startup/validation (dhcp, | |
| * ppp, etc) can cause the search to timeout | |
| * on one search element, e.g. 'fu.bar.com', | |
| * and return a definitive failure on the | |
| * next search element, e.g. 'fu.'. | |
| */ | |
| ++got_servfail; | |
| /* FALLTHROUGH */ | /* FALLTHROUGH */ |
| default: | default: |
| /* anything else implies that we're done */ | /* anything else implies that we're done */ |