will still use our expiring key for up to ``--tran-window`` seconds to
maintain continuity of transmission of tunnel data.
+ The ``--hand-window`` parameter also controls the amount of time that
+ the OpenVPN client repeats the pull request until it times out.
+
--key file
Local peer's private key in .pem format. Use the private key which was
generated when you built your peer's certificate (see ``--cert file``
}
#endif
/* fire up push request right away (already 1s delayed) */
+ c->c2.push_request_timeout = now + c->options.handshake_window;
event_timeout_init(&c->c2.push_request_interval, 0, now);
reset_coarse_timers(c);
}
enum client_connect_status context_auth;
struct event_timeout push_request_interval;
- int n_sent_push_requests;
+ time_t push_request_timeout;
bool did_pre_pull_restore;
/* hash of pulled options, so we can compare when options change */
bool
send_push_request(struct context *c)
{
- const int max_push_requests = c->options.handshake_window / PUSH_REQUEST_INTERVAL;
- if (++c->c2.n_sent_push_requests <= max_push_requests)
+ struct tls_session *session = &c->c2.tls_multi->session[TM_ACTIVE];
+ struct key_state *ks = &session->key[KS_PRIMARY];
+
+ if (c->c2.push_request_timeout > now)
{
return send_control_channel_string(c, "PUSH_REQUEST", D_PUSH);
}
else
{
- msg(D_STREAM_ERRORS, "No reply from server after sending %d push requests", max_push_requests);
+ msg(D_STREAM_ERRORS, "No reply from server to push requests in %ds",
+ (int)(now - ks->established));
c->sig->signal_received = SIGUSR1; /* SOFT-SIGUSR1 -- server-pushed connection reset */
c->sig->signal_text = "no-push-reply";
return false;