man page --client-config-dir hint
Hi,
my deep respect for this beautiful peace of software. It helps a lot every day.
I was a little astonished because client-configuration-directory files seemed to be not re-read on client connect.
I learned from the source that the responsible function only runs on session-init and not on session-move. I did´t expect this from reading the man page. The patch attached introduces a hint which could save other users a little time. I would be honored if you consider including it.
Greetings
Andreas Gaufer
Index: openvpn.8
===================================================================
RCS file: /cvsroot/openvpn/openvpn/openvpn.8,v
retrieving revision 1.68
openvpn.8 +2 -1
@@ -2540,7 +2540,8 @@ One of the useful properties of this option is that it allows client configuration files to be conveniently created, edited, or removed while the server is live, -without needing to restart the server. +without needing to restart the server. Notice that a custom +client config file is not re-read during session-move. The following options are legal in a client-specific context:
Quoted 5 lines · Andreas Gaufer
Hi,
my deep respect for this beautiful peace of software. It helps a lot every day.
Quoted 7 lines
I was a little astonished because client-configuration-directory files seemed to be not re-read on
client connect.I learned from the source that the responsible function only runs on session-init and not on
session-move.
This is by design for UDP-based configurations, since UDP is connectionless and we therefore need to distinguish between a "new" connection and a merely "renegotiated" session. The client-config-dir file is only read on a new connection.
What you can do however, to help OpenVPN know when a client is disconnecting, is to use --explicit-exit-notify. This will immediately clear out the client instance object on the server, rather than passively letting it time out over n minutes. Now, new connections will result in a new initialization of the client instance object on the server, and therefore cause a re-read of the client-config-dir file.
You can also try --nobind on the client. This will cause the reconnection to be on a new port #, which will give a hint to OpenVPN that this is a new connection and not merely the continuation of an older connection.
Quoted 4 lines
I did�t expect this from reading the man page. The patch attached introduces a hint
which could save other users a little time. I would be honored if you consider including it.
The problem is that if we start talking about session "init" vs. "move", then we need to define what we mean by each to avoid confusion.
It might be more instructive to document the concept of a client instance object on the server, and the different ways in which this object can be created or destroyed.
James