[Openvpn-devel] Update --learn-address man page with ipv6 information

Message ID 20260330231355.84547-2-gcox@mozilla.com
State New
Headers show
Series [Openvpn-devel] Update --learn-address man page with ipv6 information | expand

Commit Message

Greg Cox March 30, 2026, 11:13 p.m. UTC
Update --learn-address man page with ipv6 information

The `--learn-address` option is very v4-specific in its man page.
This expands the docs based on things I tripped over when bringing up a dual-stack server.

Signed-off-by: Greg Cox <gcox@mozilla.com>


---
 doc/man-sections/script-options.rst | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

Comments

Gert Doering March 31, 2026, 1:52 p.m. UTC | #1
Thanks.

Documentation updates for stale sections, or confusing explanations,
is more than welcome ;-)

Your patch has been applied to the master and release/2.7 branch.

commit c39742d1a73c5a94d01c11394298cf5a23eb6337 (master)
commit 081eb6ec44372a11c0bd6a7b4ce0feaa170ac376 (release/2.7)
Author: Greg Cox via Openvpn-devel
Date:   Mon Mar 30 23:13:56 2026 +0000

     Update --learn-address man page with ipv6 information

     Signed-off-by: Greg Cox <gcox@mozilla.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20260330231355.84547-2-gcox@mozilla.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36363.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/doc/man-sections/script-options.rst b/doc/man-sections/script-options.rst
index 58baf1e3614f66cc46d841fc9b4a40ed85b0e98f..f420380f00cbd2b5e421823cff96139337398203 100644
--- a/doc/man-sections/script-options.rst
+++ b/doc/man-sections/script-options.rst
@@ -52,7 +52,7 @@  Script Order of Execution
 
 #. ``--learn-address``
 
-   Executed in ``--mode server`` mode whenever an IPv4 address/route or MAC
+   Executed in ``--mode server`` mode whenever an IP address/route or MAC
    address is added to OpenVPN's internal routing table.
 
 #. ``--auth-user-pass-verify``
@@ -331,10 +331,14 @@  SCRIPT HOOKS
       OpenVPN's internal routing table.
 
   :code:`$2` - [address]
-      The address being learned or unlearned. This can be an IPv4 address
-      such as :code:`"198.162.10.14"`, an IPv4 subnet such as
-      :code:`"198.162.10.0/24"`, or an ethernet MAC address (when
-      ``--dev tap`` is being used) such as :code:`"00:FF:01:02:03:04"`.
+      The address being learned or unlearned. This can be:
+
+      * an IPv4 address such as :code:`"198.162.10.14"`,
+      * an IPv4 subnet such as :code:`"198.162.10.0/24"`,
+      * an IPv6 address such as :code:`"2001:db8:1:2:3:4:5:6"`,
+      * an IPv6 subnet such as :code:`"2001:db8:1:2:3:4:5::/112"`, or
+      * an ethernet MAC address (when ``--dev tap`` is being used)
+        such as :code:`"00:FF:01:02:03:04"`.
 
   :code:`$3` - [common name]
       The common name on the certificate associated with the client linked
@@ -353,6 +357,10 @@  SCRIPT HOOKS
   high-level common name, rather than the low level client virtual
   addresses.
 
+  A dual-stack client connecting to a dual-stack server will cause two calls
+  to the ``cmd`` script in quick succession, as the server learns each of the
+  IPv4 and IPv6 client addresses.
+
 --route-up cmd
   Run command ``cmd`` after routes are added, subject to ``--route-delay``.