res_update.c (158783) | res_update.c (158787) |
---|---|
1#if !defined(lint) && !defined(SABER) 2static const char rcsid[] = "$Id: res_update.c,v 1.6.2.4.4.2 2004/03/16 12:34:20 marka Exp $"; 3#endif /* not lint */ 4 5/* 6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 7 * Copyright (c) 1996-1999 by Internet Software Consortium. 8 * --- 10 unchanged lines hidden (view full) --- 19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 */ 21 22/* 23 * Based on the Dynamic DNS reference implementation by Viraj Bais 24 * <viraj_bais@ccm.fm.intel.com> 25 */ 26 | 1#if !defined(lint) && !defined(SABER) 2static const char rcsid[] = "$Id: res_update.c,v 1.6.2.4.4.2 2004/03/16 12:34:20 marka Exp $"; 3#endif /* not lint */ 4 5/* 6 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 7 * Copyright (c) 1996-1999 by Internet Software Consortium. 8 * --- 10 unchanged lines hidden (view full) --- 19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 */ 21 22/* 23 * Based on the Dynamic DNS reference implementation by Viraj Bais 24 * <viraj_bais@ccm.fm.intel.com> 25 */ 26 |
27#include <sys/cdefs.h> 28__FBSDID("$FreeBSD: head/lib/libc/resolv/res_update.c 158787 2006-05-21 11:19:36Z ume $"); 29 |
|
27#include "port_before.h" 28 29#include <sys/param.h> 30#include <sys/socket.h> 31#include <sys/time.h> 32 33#include <netinet/in.h> 34#include <arpa/inet.h> --- 126 unchanged lines hidden (view full) --- 161 if (n < 0) 162 goto done; 163 164 /* Temporarily replace the resolver's nameserver set. */ 165 nscount = res_getservers(statp, nsaddrs, MAXNS); 166 res_setservers(statp, zptr->z_nsaddrs, zptr->z_nscount); 167 168 /* Send the update and remember the result. */ | 30#include "port_before.h" 31 32#include <sys/param.h> 33#include <sys/socket.h> 34#include <sys/time.h> 35 36#include <netinet/in.h> 37#include <arpa/inet.h> --- 126 unchanged lines hidden (view full) --- 164 if (n < 0) 165 goto done; 166 167 /* Temporarily replace the resolver's nameserver set. */ 168 nscount = res_getservers(statp, nsaddrs, MAXNS); 169 res_setservers(statp, zptr->z_nsaddrs, zptr->z_nscount); 170 171 /* Send the update and remember the result. */ |
169 if (key != NULL) | 172 if (key != NULL) { 173#ifdef _LIBC 174 DPRINTF(("TSIG is not supported\n")); 175 RES_SET_H_ERRNO(statp, NO_RECOVERY); 176 goto done; 177#else |
170 n = res_nsendsigned(statp, packet, n, key, 171 answer, sizeof answer); | 178 n = res_nsendsigned(statp, packet, n, key, 179 answer, sizeof answer); |
172 else | 180#endif 181 } else |
173 n = res_nsend(statp, packet, n, answer, sizeof answer); 174 if (n < 0) { 175 DPRINTF(("res_nsend: send error, n=%d (%s)\n", 176 n, strerror(errno))); 177 goto done; 178 } 179 if (((HEADER *)answer)->rcode == NOERROR) 180 nzones++; --- 32 unchanged lines hidden --- | 182 n = res_nsend(statp, packet, n, answer, sizeof answer); 183 if (n < 0) { 184 DPRINTF(("res_nsend: send error, n=%d (%s)\n", 185 n, strerror(errno))); 186 goto done; 187 } 188 if (((HEADER *)answer)->rcode == NOERROR) 189 nzones++; --- 32 unchanged lines hidden --- |