[PATCH] Fix connection stats rekey times
Cline, Wade
wade.cline at intel.com
Tue Feb 27 19:20:15 PST 2024
On Tue, Feb 27, 2024 at 03:37:47PM -0800, Daniel Lenski wrote:
> On Tue, Feb 27, 2024 at 9:04???AM Daniel Lenski <dlenski at gmail.com> wrote:
> >
> > On Mon, Feb 26, 2024 at 6:50???PM Cline, Wade <wade.cline at intel.com> wrote:
> > >
> > > ---
> > > main.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/main.c b/main.c
> > > index 65be6a2f..ef426dd6 100644
> > > --- a/main.c
> > > +++ b/main.c
> > > @@ -1565,14 +1565,14 @@ static void print_connection_stats(void *_vpninfo, const struct oc_stats *stats)
> > > vpninfo->proto->udp_protocol ? : "UDP", openconnect_get_dtls_cipher(vpninfo));
> > > if (vpninfo->ssl_times.last_rekey && vpninfo->ssl_times.rekey)
> > > vpn_progress(vpninfo, PRG_INFO, _("Next SSL rekey in %ld seconds\n"),
> > > - (long)(time(NULL) - vpninfo->ssl_times.last_rekey + vpninfo->ssl_times.rekey));
> > > + (long)(vpninfo->ssl_times.last_rekey + vpninfo->ssl_times.rekey - time(NULL)));
> > > if (vpninfo->dtls_times.last_rekey && vpninfo->dtls_times.rekey)
> > > vpn_progress(vpninfo, PRG_INFO, _("Next %s rekey in %ld seconds\n"),
> > > vpninfo->proto->udp_protocol ? : "UDP",
> > > - (long)(time(NULL) - vpninfo->ssl_times.last_rekey + vpninfo->ssl_times.rekey));
> > > + (long)(vpninfo->ssl_times.last_rekey + vpninfo->ssl_times.rekey - time(NULL)));
> > > if (vpninfo->trojan_interval && vpninfo->last_trojan)
> > > vpn_progress(vpninfo, PRG_INFO, _("Next Trojan invocation in %ld seconds\n"),
> > > - (long)(time(NULL) - vpninfo->last_trojan + vpninfo->trojan_interval));
> > > + (long)(vpninfo->last_trojan + vpninfo->trojan_interval - time(NULL)));
> > >
> > > /* XX: restore loglevel */
> > > openconnect_set_loglevel(vpninfo, saved_loglevel);
> >
> > Thank you, good catch here. These have been calculated incorrectly
> > ever since I added the SIGUSR1 handler to log connection stats in
> > https://gitlab.com/openconnect/openconnect/-/commit/b156b581e894b03e7169827b9e293ca2f13e1366.
> >
> > And thanks Dimitri for creating
> > https://gitlab.com/openconnect/openconnect/-/merge_requests/539 for
> > this.
>
> Hi Wade,
> Could you please resend this patch with `Signed-off-by: NAME <EMAIL>`
> in the footer? (`git commit --signoff` will do this)
>
> Our BDFL David reminded us in
> https://gitlab.com/openconnect/openconnect/-/merge_requests/539#note_1791676817
> that we need to get this from the original author of every patch. ???
Sorry about that; I added the sign-off in one environment but forgot to
sync the two before sending the patch!
Regards,
Wade
> Thanks!
More information about the openconnect-devel
mailing list