Rename "resolver" to "nameserver" in the configuration file.
authorflorian <florian@openbsd.org>
Fri, 20 Jul 2018 13:17:02 +0000 (13:17 +0000)
committerflorian <florian@openbsd.org>
Fri, 20 Jul 2018 13:17:02 +0000 (13:17 +0000)
resolv.conf(5) and dhclient(8) are using the term nameserver for many
years, there is no good reason to be different here.

Pointed out by deraadt

usr.sbin/rad/parse.y
usr.sbin/rad/printconf.c
usr.sbin/rad/rad.conf.5

index 582d165..322f0e7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parse.y,v 1.3 2018/07/15 09:28:21 florian Exp $       */
+/*     $OpenBSD: parse.y,v 1.4 2018/07/20 13:17:02 florian Exp $       */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -115,7 +115,7 @@ typedef struct {
 %token DEFAULT ROUTER HOP LIMIT MANAGED ADDRESS
 %token CONFIGURATION OTHER LIFETIME REACHABLE TIME RETRANS TIMER
 %token AUTO PREFIX VALID PREFERRED LIFETIME ONLINK AUTONOMOUS
-%token ADDRESS_CONFIGURATION DNS RESOLVER SEARCH
+%token ADDRESS_CONFIGURATION DNS NAMESERVER SEARCH
 
 %token <v.string>      STRING
 %token <v.number>      NUMBER
@@ -303,27 +303,27 @@ dnsopts_l : dnsopts_l dnsoptsl nl
 dnsoptsl       : LIFETIME NUMBER {
                        ra_iface_conf->rdns_lifetime = $2;
                }
-               | RESOLVER resolver_block
+               | NAMESERVER nserver_block
                | SEARCH search_block
                ;
-resolver_block : '{' optnl resolveropts_l '}'
-               | '{' optnl '}'
-               | resolveroptsl
-               | /* empty */
-               ;
-
-resolveropts_l : resolveropts_l resolveroptsl optnl
-               | resolveroptsl optnl
+nserver_block  : '{' optnl nserveropts_l '}'
+                       | '{' optnl '}'
+                       | nserveroptsl
+                       | /* empty */
+                       ;
+
+nserveropts_l  : nserveropts_l nserveroptsl optnl
+               | nserveroptsl optnl
                ;
 
-resolveroptsl  : STRING {
+nserveroptsl   : STRING {
                        struct ra_rdnss_conf    *ra_rdnss_conf;
                        struct in6_addr          addr;
 
                        memset(&addr, 0, sizeof(addr));
                        if (inet_pton(AF_INET6, $1, &addr)
                            != 1) {
-                               yyerror("error parsing resolver address %s",
+                               yyerror("error parsing nameserver address %s",
                                    $1);
                                free($1);
                                YYERROR;
@@ -423,13 +423,13 @@ lookup(char *s)
                {"lifetime",            LIFETIME},
                {"limit",               LIMIT},
                {"managed",             MANAGED},
+               {"nameserver",          NAMESERVER},
                {"no",                  NO},
                {"on-link",             ONLINK},
                {"other",               OTHER},
                {"preferred",           PREFERRED},
                {"prefix",              PREFIX},
                {"reachable",           REACHABLE},
-               {"resolver",            RESOLVER},
                {"retrans",             RETRANS},
                {"router",              ROUTER},
                {"search",              SEARCH},
index 1fc8cd4..1614fba 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: printconf.c,v 1.2 2018/07/15 09:28:21 florian Exp $   */
+/*     $OpenBSD: printconf.c,v 1.3 2018/07/20 13:17:02 florian Exp $   */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -104,7 +104,7 @@ print_config(struct rad_conf *conf)
                        printf("\tdns {\n");
                        printf("\t\tlifetime %u\n", iface->rdns_lifetime);
                        if (!SIMPLEQ_EMPTY(&iface->ra_rdnss_list)) {
-                               printf("\t\tresolver {\n");
+                               printf("\t\tnameserver {\n");
                                SIMPLEQ_FOREACH(ra_rdnss,
                                    &iface->ra_rdnss_list, entry) {
                                        inet_ntop(AF_INET6, &ra_rdnss->rdnss,
index 6ca6b3e..36d1005 100644 (file)
@@ -1,4 +1,4 @@
-.\"    $OpenBSD: rad.conf.5,v 1.6 2018/07/15 11:35:57 jmc Exp $
+.\"    $OpenBSD: rad.conf.5,v 1.7 2018/07/20 13:17:02 florian Exp $
 .\"
 .\" Copyright (c) 2018 Florian Obser <florian@openbsd.org>
 .\" Copyright (c) 2005 Esben Norby <norby@openbsd.org>
@@ -18,7 +18,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: July 15 2018 $
+.Dd $Mdocdate: July 20 2018 $
 .Dt RAD.CONF 5
 .Os
 .Sh NAME
@@ -78,7 +78,7 @@ not available and hosts should consult DHCPv6.
 The default is no.
 .It Ic other configuration Pq Ic yes Ns | Ns Ic no
 If set to yes, hosts should consult DHCPv6 for additional configuration
-like NTP servers or DNS resolvers.
+like NTP servers or DNS name servers.
 .It Ic router lifetime Ar seconds
 The number of seconds this router is a valid default router after receiving
 a router advertisement message.
@@ -126,7 +126,7 @@ prefix.
 The default is 2592000.
 .El
 .Pp
-Recursive resolvers are configured inside an interface block:
+Name servers are configured inside an interface block:
 .Bd -unfilled -offset indent
 .Ic dns Brq dns options
 .Ed
@@ -138,8 +138,8 @@ options are as follows:
 The number of seconds the dns options are valid after receiving a router
 advertisement message.
 The default is 900 seconds.
-.It Ic resolver Pq Ar IP Ns | Ns { resolver list }
-IPv6 address or list of IPv6 addresses of recursive DNS resolvers.
+.It Ic nameserver Pq Ar IP Ns | Ns { nameserver list }
+IPv6 address or list of IPv6 addresses of DNS name servers.
 .It Ic search Pq Ar domain Ns | Ns { domain list }
 Domain or list of domains for the
 .Xr resolv.conf 5