res_update.c (046c3635cdb274a1f6ccec9933899f5b3bc043a2) | res_update.c (e45764721aedfa6460e1767664864bda9457c10e) |
---|---|
1#if !defined(lint) && !defined(SABER) 2static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/04/27 04:56:43 sra 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 * --- 11 unchanged lines hidden (view full) --- 20 */ 21 22/*! \file 23 * \brief 24 * Based on the Dynamic DNS reference implementation by Viraj Bais 25 * <viraj_bais@ccm.fm.intel.com> 26 */ 27 | 1#if !defined(lint) && !defined(SABER) 2static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/04/27 04:56:43 sra 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 * --- 11 unchanged lines hidden (view full) --- 20 */ 21 22/*! \file 23 * \brief 24 * Based on the Dynamic DNS reference implementation by Viraj Bais 25 * <viraj_bais@ccm.fm.intel.com> 26 */ 27 |
28#include <sys/cdefs.h> 29__FBSDID("$FreeBSD$"); 30 |
|
28#include "port_before.h" 29 30#include <sys/param.h> 31#include <sys/socket.h> 32#include <sys/time.h> 33 34#include <netinet/in.h> 35#include <arpa/inet.h> --- 126 unchanged lines hidden (view full) --- 162 if (n < 0) 163 goto done; 164 165 /* Temporarily replace the resolver's nameserver set. */ 166 nscount = res_getservers(statp, nsaddrs, MAXNS); 167 res_setservers(statp, zptr->z_nsaddrs, zptr->z_nscount); 168 169 /* Send the update and remember the result. */ | 31#include "port_before.h" 32 33#include <sys/param.h> 34#include <sys/socket.h> 35#include <sys/time.h> 36 37#include <netinet/in.h> 38#include <arpa/inet.h> --- 126 unchanged lines hidden (view full) --- 165 if (n < 0) 166 goto done; 167 168 /* Temporarily replace the resolver's nameserver set. */ 169 nscount = res_getservers(statp, nsaddrs, MAXNS); 170 res_setservers(statp, zptr->z_nsaddrs, zptr->z_nscount); 171 172 /* Send the update and remember the result. */ |
170 if (key != NULL) | 173 if (key != NULL) { 174#ifdef _LIBC 175 DPRINTF(("TSIG is not supported\n")); 176 RES_SET_H_ERRNO(statp, NO_RECOVERY); 177 goto done; 178#else |
171 n = res_nsendsigned(statp, packet, n, key, 172 answer, sizeof answer); | 179 n = res_nsendsigned(statp, packet, n, key, 180 answer, sizeof answer); |
173 else | 181#endif 182 } else |
174 n = res_nsend(statp, packet, n, answer, sizeof answer); 175 if (n < 0) { 176 DPRINTF(("res_nsend: send error, n=%d (%s)\n", 177 n, strerror(errno))); 178 goto done; 179 } 180 if (((HEADER *)answer)->rcode == NOERROR) 181 nzones++; --- 32 unchanged lines hidden --- | 183 n = res_nsend(statp, packet, n, answer, sizeof answer); 184 if (n < 0) { 185 DPRINTF(("res_nsend: send error, n=%d (%s)\n", 186 n, strerror(errno))); 187 goto done; 188 } 189 if (((HEADER *)answer)->rcode == NOERROR) 190 nzones++; --- 32 unchanged lines hidden --- |