Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#1441 closed Bug / Defect (notabug)

Client-disconnect is given client-connect time_unix value

Reported by: tct Owned by:
Priority: minor Milestone:
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:

Description (last modified by tct)

When scripts run they are given a value for time_unix, which is the time at which the script is executed.

Client-disconnect script does not get the current time for when the script is executed, it is given the time value for when client-connect was executed.

Client-connect env:

time_ascii=2021-11-29 15:10:49

Client-disconnect env:

time_ascii=2021-11-29 15:10:49

This is the single occurrence of time_unix in the entire source (multi.c:1742):

    /* setenv connection time */
        const char *created_ascii = time_string(mi->created, 0, false, &gc);
        setenv_str(mi->, "time_ascii", created_ascii);
        setenv_long_long(mi->, "time_unix", mi->created);

Change History (3)

comment:1 Changed 6 months ago by tct

Description: modified (diff)

comment:2 Changed 6 months ago by tct

Description: modified (diff)

comment:3 Changed 6 months ago by tct

Resolution: notabug
Status: newclosed

According to the manual (and plaisthos):


Client connection timestamp, formatted as a unix integer date/time value. Set prior to execution of the --client-connect script.

time_unix is a connection timestamp not a script execution timestamp.

Last edited 6 months ago by tct (previous) (diff)
Note: See TracTickets for help on using tickets.