Skip to content

Commit

Permalink
Drop unnecessary root server checks
Browse files Browse the repository at this point in the history
  • Loading branch information
k0ekk0ek committed May 30, 2023
1 parent 50b063e commit 2ddbacd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
9 changes: 1 addition & 8 deletions configure.ac
Expand Up @@ -938,14 +938,7 @@ AC_DEFINE_UNQUOTED([TCP_TIMEOUT], $tcp_timeout, [Define to the default tcp timeo
dnl
dnl Features
dnl
AC_ARG_ENABLE(root-server, AS_HELP_STRING([--enable-root-server],[Configure NSD as a root server]))
case "$enable_root_server" in
yes)
AC_DEFINE_UNQUOTED([ROOT_SERVER], [], [Define this to configure as a root server.])
;;
no|*)
;;
esac
AC_ARG_ENABLE(root-server, AS_HELP_STRING([--enable-root-server],[Configure NSD as a root server (obsolete)]))

AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--disable-ipv6],[Disables IPv6 support]))
case "$enable_ipv6" in
Expand Down
3 changes: 3 additions & 0 deletions doc/ChangeLog
@@ -1,3 +1,6 @@
30 May 2023: Jeroen
- Fix #275: Drop unnecessary root server checks.

30 May 2023: Wouter
- Next version is 4.7.0, instead of 4.6.2, because of the added
features, like TLS for DNSTAP.
Expand Down
7 changes: 0 additions & 7 deletions nsd-checkconf.c
Expand Up @@ -791,13 +791,6 @@ additional_checks(nsd_options_type* opt, const char* filename)
errors ++;
continue;
}
#ifndef ROOT_SERVER
/* Is it a root zone? Are we a root server then? Idiot proof. */
if(dname->label_count == 1) {
fprintf(stderr, "%s: not configured as a root server.\n", filename);
errors ++;
}
#endif
if(zone->pattern->allow_notify && !zone->pattern->request_xfr) {
fprintf(stderr, "%s: zone %s has allow-notify but no request-xfr"
" items. Where can it get a zone transfer when a notify "
Expand Down
8 changes: 0 additions & 8 deletions zonec.c
Expand Up @@ -2209,14 +2209,6 @@ zonec_read(const char* name, const char* zonefile, zone_type* zone)
return 1;
}

#ifndef ROOT_SERVER
/* Is it a root zone? Are we a root server then? Idiot proof. */
if (dname->label_count == 1) {
zc_error("not configured as a root server");
return 1;
}
#endif

/* Open the zone file */
if (!zone_open(zonefile, 3600, CLASS_IN, dname)) {
zc_error("cannot open '%s': %s", zonefile, strerror(errno));
Expand Down

0 comments on commit 2ddbacd

Please sign in to comment.