[Openvpn-devel,2/2] Fix port-share journal doc

Message ID d7c52354-8263-4423-8a4f-39bab3bd4d97@gmx.de
State Accepted
Headers show
Series [Openvpn-devel,1/2] Fix IPv6 in port-share journal | expand

Commit Message

corubba Dec. 7, 2024, 11:19 p.m. UTC
Filename and content descriptions were switched.

Signed-off-by: corubba <corubba@gmx.de>
---
 doc/man-sections/server-options.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.47.1

Comments

Gert Doering Dec. 8, 2024, 2:20 p.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Neither the code nor the manpage are particularily easy to digest, but
after staring at the code for quite a bit I have to agree with your
manpage fix.  The "to" bit goes into the filename...

  && !getsockname(cp->sd, (struct sockaddr *) &to.addr.sa, &dlen))
..
     const char *t = print_openvpn_sockaddr(&to, &gc);
     fnlen =  strlen(journal_dir) + strlen(t) + 2;
     snprintf(jfn, fnlen, "%s/%s", journal_dir, t);


.. and the "from" bit into the file content.

     if (!getpeername(pc->sd, (struct sockaddr *) &from.addr.sa, &slen)
..
     const char *f = print_openvpn_sockaddr(&from, &gc);
     if (write(fd, f, strlen(f)) != strlen(f))


Your patch has been applied to the master and release/2.6 branch (bugfix).

commit 9343cd101d74377305b96cd501b8659f64c70e46 (master)
commit 6d64fa4bfff935eb82f9786f709126ab02f0d8b3 (release/2.6)
Author: corubba
Date:   Sun Dec 8 00:19:35 2024 +0100

     Fix port-share journal doc

     Signed-off-by: corubba <corubba@gmx.de>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <d7c52354-8263-4423-8a4f-39bab3bd4d97@gmx.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30036.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/doc/man-sections/server-options.rst b/doc/man-sections/server-options.rst
index 0632e314..3fe9862c 100644
--- a/doc/man-sections/server-options.rst
+++ b/doc/man-sections/server-options.rst
@@ -429,7 +429,7 @@  fast hardware. SSL/TLS authentication must be used in this mode.

   ``dir`` specifies an optional directory where a temporary file with name
   N containing content C will be dynamically generated for each proxy
-  connection, where N is the source IP:port of the client connection and C
+  connection, where C is the source IP:port of the client connection and N
   is the source IP:port of the connection to the proxy receiver. This
   directory can be used as a dictionary by the proxy receiver to determine
   the origin of the connection. Each generated file will be automatically