[PATCH] Documented the "ipv4=off" parameter of the "resolver" directive

Maxim Dounin mdounin at mdounin.ru
Tue Jul 19 13:48:31 UTC 2022


Hello!

On Tue, Jul 19, 2022 at 02:24:49PM +0100, Yaroslav Zhuravlev wrote:

> Here's a slightly reworked version: 
> 
> "By default, nginx will look up both IPv4 and IPv6 addresses 
> while resolving. If looking up of IPv4 or IPv6 addresses is not 
> desired, the ipv4=off (1.23.1) or the ipv6=off parameter can be 
> specified."
> 
> There is also an alternative variant:
> 
> ""By default, nginx will look up both IPv4 and IPv6 addresses 
> while resolving. If looking up of of either address family is 
> not desired, the ipv4=off (1.23.1) or the ipv6=off parameter can 
> be specified."

Both variants look good to me.

> # HG changeset patch
> # User Yaroslav Zhuravlev <yar at nginx.com>
> # Date 1658236202 -3600
> #      Tue Jul 19 14:10:02 2022 +0100
> # Node ID e76c1b137b99a004b0344c825ada94657508bb0e
> # Parent  9172cf4d2713b685d6956810e5fcad4c29881637
> Documented the "ipv4=off" parameter of the "resolver" directive.
> 
> diff --git a/xml/en/docs/http/ngx_http_core_module.xml b/xml/en/docs/http/ngx_http_core_module.xml
> --- a/xml/en/docs/http/ngx_http_core_module.xml
> +++ b/xml/en/docs/http/ngx_http_core_module.xml
> @@ -10,7 +10,7 @@
>  <module name="Module ngx_http_core_module"
>          link="/en/docs/http/ngx_http_core_module.html"
>          lang="en"
> -        rev="99">
> +        rev="100">
>  
>  <section id="directives" name="Directives">
>  
> @@ -2180,6 +2180,7 @@
>  <syntax>
>      <value>address</value> ...
>      [<literal>valid</literal>=<value>time</value>]
> +    [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>status_zone</literal>=<value>zone</value>]</syntax>
>  <default/>
> @@ -2206,7 +2207,8 @@
>  
>  <para id="resolver_ipv6">
>  By default, nginx will look up both IPv4 and IPv6 addresses while resolving.
> -If looking up of IPv6 addresses is not desired,
> +If looking up of IPv4 or IPv6 addresses is not desired,
> +the <literal>ipv4=off</literal> (1.23.1) or
>  the <literal>ipv6=off</literal> parameter can be specified.
>  <note>
>  Resolving of names into IPv6 addresses is supported
> diff --git a/xml/en/docs/mail/ngx_mail_core_module.xml b/xml/en/docs/mail/ngx_mail_core_module.xml
> --- a/xml/en/docs/mail/ngx_mail_core_module.xml
> +++ b/xml/en/docs/mail/ngx_mail_core_module.xml
> @@ -10,7 +10,7 @@
>  <module name="Module ngx_mail_core_module"
>          link="/en/docs/mail/ngx_mail_core_module.html"
>          lang="en"
> -        rev="19">
> +        rev="20">
>  
>  <section id="summary">
>  
> @@ -313,6 +313,7 @@
>  <syntax>
>      <value>address</value> ...
>      [<literal>valid</literal>=<value>time</value>]
> +    [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>status_zone</literal>=<value>zone</value>]</syntax>
>  <syntax><literal>off</literal></syntax>
> @@ -344,7 +345,8 @@
>  
>  <para id="resolver_ipv6">
>  By default, nginx will look up both IPv4 and IPv6 addresses while resolving.
> -If looking up of IPv6 addresses is not desired,
> +If looking up of IPv4 or IPv6 addresses is not desired,
> +the <literal>ipv4=off</literal> (1.23.1) or
>  the <literal>ipv6=off</literal> parameter can be specified.
>  <note>
>  Resolving of names into IPv6 addresses is supported
> diff --git a/xml/en/docs/stream/ngx_stream_core_module.xml b/xml/en/docs/stream/ngx_stream_core_module.xml
> --- a/xml/en/docs/stream/ngx_stream_core_module.xml
> +++ b/xml/en/docs/stream/ngx_stream_core_module.xml
> @@ -9,7 +9,7 @@
>  <module name="Module ngx_stream_core_module"
>          link="/en/docs/stream/ngx_stream_core_module.html"
>          lang="en"
> -        rev="34">
> +        rev="35">
>  
>  <section id="summary">
>  
> @@ -341,6 +341,7 @@
>  <syntax>
>      <value>address</value> ...
>      [<literal>valid</literal>=<value>time</value>]
> +    [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>status_zone</literal>=<value>zone</value>]</syntax>
>  <default/>
> @@ -362,7 +363,8 @@
>  
>  <para id="resolver_ipv6">
>  By default, nginx will look up both IPv4 and IPv6 addresses while resolving.
> -If looking up of IPv6 addresses is not desired,
> +If looking up of IPv4 or IPv6 addresses is not desired,
> +the <literal>ipv4=off</literal> (1.23.1) or
>  the <literal>ipv6=off</literal> parameter can be specified.
>  </para>
>  
> diff --git a/xml/ru/docs/http/ngx_http_core_module.xml b/xml/ru/docs/http/ngx_http_core_module.xml
> --- a/xml/ru/docs/http/ngx_http_core_module.xml
> +++ b/xml/ru/docs/http/ngx_http_core_module.xml
> @@ -10,7 +10,7 @@
>  <module name="Модуль ngx_http_core_module"
>          link="/ru/docs/http/ngx_http_core_module.html"
>          lang="ru"
> -        rev="99">
> +        rev="100">
>  
>  <section id="directives" name="Директивы">
>  
> @@ -2177,6 +2177,7 @@
>  <syntax>
>      <value>адрес</value> ...
>      [<literal>valid</literal>=<value>время</value>]
> +    [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>status_zone</literal>=<value>зона</value>]</syntax>
>  <default/>
> @@ -2204,8 +2205,9 @@
>  <para id="resolver_ipv6">
>  По умолчанию nginx будет искать как IPv4-, так и IPv6-адреса
>  при преобразовании имён в адреса.
> -Если поиск IPv6-адресов нежелателен,
> -можно указать параметр <literal>ipv6=off</literal>.
> +Если поиск IPv4- или IPv6-адресов нежелателен,
> +можно указать параметр <literal>ipv4=off</literal> (1.23.1) или
> +<literal>ipv6=off</literal>.
>  <note>
>  Преобразование имён в IPv6-адреса поддерживается
>  начиная с версии 1.5.8.
> diff --git a/xml/ru/docs/mail/ngx_mail_core_module.xml b/xml/ru/docs/mail/ngx_mail_core_module.xml
> --- a/xml/ru/docs/mail/ngx_mail_core_module.xml
> +++ b/xml/ru/docs/mail/ngx_mail_core_module.xml
> @@ -10,7 +10,7 @@
>  <module name="Модуль ngx_mail_core_module"
>          link="/ru/docs/mail/ngx_mail_core_module.html"
>          lang="ru"
> -        rev="19">
> +        rev="20">
>  
>  <section id="summary">
>  
> @@ -316,6 +316,7 @@
>  <syntax>
>      <value>адрес</value> ...
>      [<literal>valid</literal>=<value>time</value>]
> +    [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>status_zone</literal>=<value>зона</value>]</syntax>
>  <syntax><literal>off</literal></syntax>
> @@ -348,8 +349,9 @@
>  <para id="resolver_ipv6">
>  По умолчанию nginx будет искать как IPv4-, так и IPv6-адреса
>  при преобразовании имён в адреса.
> -Если поиск IPv6-адресов нежелателен,
> -можно указать параметр <literal>ipv6=off</literal>.
> +Если поиск IPv4- или IPv6-адресов нежелателен,
> +можно указать параметр <literal>ipv4=off</literal> (1.23.1) или
> +<literal>ipv6=off</literal>.
>  <note>
>  Преобразование имён в IPv6-адреса поддерживается
>  начиная с версии 1.5.8.
> diff --git a/xml/ru/docs/stream/ngx_stream_core_module.xml b/xml/ru/docs/stream/ngx_stream_core_module.xml
> --- a/xml/ru/docs/stream/ngx_stream_core_module.xml
> +++ b/xml/ru/docs/stream/ngx_stream_core_module.xml
> @@ -9,7 +9,7 @@
>  <module name="Модуль ngx_stream_core_module"
>          link="/ru/docs/stream/ngx_stream_core_module.html"
>          lang="ru"
> -        rev="34">
> +        rev="35">
>  
>  <section id="summary">
>  
> @@ -346,6 +346,7 @@
>  <syntax>
>      <value>адрес</value> ...
>      [<literal>valid</literal>=<value>время</value>]
> +    [<literal>ipv4</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]
>      [<literal>status_zone</literal>=<value>зона</value>]</syntax>
>  <default/>
> @@ -368,8 +369,9 @@
>  <para id="resolver_ipv6">
>  По умолчанию nginx будет искать как IPv4-, так и IPv6-адреса
>  при преобразовании имён в адреса.
> -Если поиск IPv6-адресов нежелателен,
> -можно указать параметр <literal>ipv6=off</literal>.
> +Если поиск IPv4- или IPv6-адресов нежелателен,
> +можно указать параметр <literal>ipv4=off</literal> (1.23.1) или
> +<literal>ipv6=off</literal>.
>  </para>
>  
>  <para id="resolver_valid">

Looks good.

-- 
Maxim Dounin
http://mdounin.ru/



More information about the nginx-devel mailing list