mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
delete name operations were broken by the change allowing ttls in delete
commands.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: nsupdate.c,v 1.79 2001/01/21 21:54:32 bwelling Exp $ */
|
/* $Id: nsupdate.c,v 1.80 2001/01/22 20:00:56 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -983,7 +983,6 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
|
|||||||
isc_textregion_t region;
|
isc_textregion_t region;
|
||||||
char *endp;
|
char *endp;
|
||||||
isc_uint16_t retval;
|
isc_uint16_t retval;
|
||||||
isc_boolean_t parsedclass = ISC_FALSE;
|
|
||||||
|
|
||||||
ddebug("update_addordelete()");
|
ddebug("update_addordelete()");
|
||||||
|
|
||||||
@@ -1008,17 +1007,24 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
|
|||||||
*/
|
*/
|
||||||
word = nsu_strsep(&cmdline, " \t\r\n");
|
word = nsu_strsep(&cmdline, " \t\r\n");
|
||||||
if (*word == 0) {
|
if (*word == 0) {
|
||||||
if (!isdelete)
|
if (!isdelete) {
|
||||||
fprintf(stderr, "failed to read owner ttl\n");
|
fprintf(stderr, "failed to read owner ttl\n");
|
||||||
else
|
|
||||||
fprintf(stderr, "failed to read class or type \n");
|
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ttl = 0;
|
||||||
|
rdataclass = dns_rdataclass_any;
|
||||||
|
rdatatype = dns_rdatatype_any;
|
||||||
|
rdata->flags = DNS_RDATA_UPDATE;
|
||||||
|
goto doneparsing;
|
||||||
|
}
|
||||||
|
}
|
||||||
ttl = strtol(word, &endp, 0);
|
ttl = strtol(word, &endp, 0);
|
||||||
if (*endp != '\0') {
|
if (*endp != '\0') {
|
||||||
if (isdelete)
|
if (isdelete) {
|
||||||
parsedclass = ISC_TRUE;
|
ttl = 0;
|
||||||
else {
|
goto parseclass;
|
||||||
|
} else {
|
||||||
fprintf(stderr, "ttl '%s' is not numeric\n", word);
|
fprintf(stderr, "ttl '%s' is not numeric\n", word);
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
@@ -1041,8 +1047,8 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
|
|||||||
/*
|
/*
|
||||||
* Read the class or type.
|
* Read the class or type.
|
||||||
*/
|
*/
|
||||||
if (!parsedclass)
|
|
||||||
word = nsu_strsep(&cmdline, " \t\r\n");
|
word = nsu_strsep(&cmdline, " \t\r\n");
|
||||||
|
parseclass:
|
||||||
if (*word == 0) {
|
if (*word == 0) {
|
||||||
if (isdelete) {
|
if (isdelete) {
|
||||||
rdataclass = dns_rdataclass_any;
|
rdataclass = dns_rdataclass_any;
|
||||||
|
Reference in New Issue
Block a user