diff options
author | ume <ume@FreeBSD.org> | 2006-05-21 11:19:36 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2006-05-21 11:19:36 +0000 |
commit | 2103e7a60f93b5663802fad9b458412411640d7c (patch) | |
tree | c1044e7b7cb8c4f2ee0140e9bd313cfdfe850d2a /lib/libc/resolv/res_update.c | |
parent | 0cedd121cc954b5d6234228b0747f25f402fb62e (diff) | |
download | FreeBSD-src-2103e7a60f93b5663802fad9b458412411640d7c.zip FreeBSD-src-2103e7a60f93b5663802fad9b458412411640d7c.tar.gz |
Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.
X-MFC after: never
Diffstat (limited to 'lib/libc/resolv/res_update.c')
-rw-r--r-- | lib/libc/resolv/res_update.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/libc/resolv/res_update.c b/lib/libc/resolv/res_update.c index 8783d8a..174cdac 100644 --- a/lib/libc/resolv/res_update.c +++ b/lib/libc/resolv/res_update.c @@ -24,6 +24,9 @@ static const char rcsid[] = "$Id: res_update.c,v 1.6.2.4.4.2 2004/03/16 12:34:20 * <viraj_bais@ccm.fm.intel.com> */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include "port_before.h" #include <sys/param.h> @@ -166,10 +169,16 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in, ns_tsig_key *key) { res_setservers(statp, zptr->z_nsaddrs, zptr->z_nscount); /* Send the update and remember the result. */ - if (key != NULL) + if (key != NULL) { +#ifdef _LIBC + DPRINTF(("TSIG is not supported\n")); + RES_SET_H_ERRNO(statp, NO_RECOVERY); + goto done; +#else n = res_nsendsigned(statp, packet, n, key, answer, sizeof answer); - else +#endif + } else n = res_nsend(statp, packet, n, answer, sizeof answer); if (n < 0) { DPRINTF(("res_nsend: send error, n=%d (%s)\n", |