Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion openvpn/client/cliproto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,15 @@ class Session : ProtoContextCallbackInterface,
{
const ClientHalt ch(msg, true);
if (!ch.psid() && creds)
creds->purge_session_id();
{
// On RESTART, clear the cached username/password but keep the auth-token,
// allowing the client to reconnect without prompting the user. If the token
// is no longer valid, it will be cleared when AUTH_FAILED is received.
if (ch.restart())
creds->purge_user_pass();
else
creds->purge_session_id();
}
if (ch.restart())
fatal_ = Error::CLIENT_RESTART;
else
Expand Down