Re: Can a configuration item be cleared in the server.conf file

Gert Doering <[email protected]>
Newsgroups gmane.network.openvpn.user
Message-ID <[email protected]>
Hi,

On Mon, Feb 05, 2024 at 12:25:51PM +0100, Bo Berglund wrote:
> >  https://community.openvpn.net/openvpn/ticket/719
> >
> >which says that from 2.5.0 on, there should be POSIX timestamps.
> >
> >How old is your OpenVPN?
> 
> This is on the Ubuntu 20.04 LTS server:
> 
> Aug 21 2023:
> 
> $ openvpn --version
> OpenVPN 2.4.12 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11]

Ah, yes.  So that's a bit of an antique :-)


> Well not quite so:
> 
> $ openvpn --show-gateway
> Mon Feb  5 12:15:15 2024 ROUTE_GATEWAY 192.168.119.1/255.255.255.0 IFACE=eth0
> HWADDR=a4:ae:12:7f:4d:c3
> 
> It looks like a kind of locale thing, thinking that it is a US location, but it
> uses the CET time zone notwithstanding:

No, it's just old OpenVPN.  The ticket I linked to shows that I changed
the logging timestamp to ISO format "for 2.5.0".  Your 2.4.12 has a
release date younger than 2.5.0 (due to overlapping release trains), but
feature-wise, it's older.

We maintain multiple releases in parallel (like, 2.4.x and 2.5.x, or now
2.5.x and 2.6.x).  Features get added to "master" and show up in the next
.0 release (2.5.0, 2.6.0).  After that, only bugfixes (and sometimes minor
features) get added to .1, .2, .3 releases - "changing time stamps and
making logs look very different" was seen as breaking change, so even
if the code change is small, not suitable for integration in 2.4.9->2.4.10.

See also:
  https://community.openvpn.net/openvpn/wiki/SupportedVersions


IOW, yes, the old code was using the C function "ctime()", which will
print "something locale based".  The new code changes that to an ISO 8601
based format, locale independent

commit ff063b6f19e035da56fbf49c891e6376543b391d
Author: Gert Doering <[email protected]>
Date:   Sat Jun 20 19:23:03 2020 +0200

    Change timestamps in file-based logging to ISO 8601 time format.
...
--- a/src/openvpn/otime.c
+++ b/src/openvpn/otime.c
...
-    buf_printf(&out, "%s", ctime(&t));
-    buf_rmtail(&out, '\n');
+    struct tm *tm = localtime(&t);
+
+    buf_printf(&out, "%04d-%02d-%02d %02d:%02d:%02d",
+                tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
+                tm->tm_hour, tm->tm_min, tm->tm_sec);


gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]

_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users
signature.asc (application/pgp-signature, 630 B)
-----BEGIN PGP SIGNATURE-----

iQGcBAEBAgAGBQJlwNzmAAoJEB2Cnv7KVigSGKQL/jQwMaysXfRAP0nMy9wob6+u
LjXOS23d24xEMEV+wWpKgpRZYuixIzGu7JuL06n6vXRFXS7ZNdksQROeuWLn6rC1
eE1/y1qKuKy8lk1slKdSx3ESa8bhCmqSY0OFBAfeazdeaTxudUGmM8WZ1E1kGKzv
u3lpauavQSPB/Uq4fm57v6amHoBqdhDUo130mQDb4f9doBYihUePmp3mWMbAwvt+
tE8GlfdWJshxcNKHJzVeufVgRz38XklCNqLDwGWGRa5HiF+srRp4pf8T0zEVADkH
GZqv7r33Elcg0/uhMFdvlfqXH/95trzhfXRDoxg+JCCvVz4CJTup2KI6L38FmOic
n4LsmVL7JJk3WDmwMpKL1S6bzsWyGTa+xB8sPdr66PyHVjows7GleI9B7/xQvMzG
PCM+uGfWbQGz90qvN4zZrGkbp2ge2qdqVePJ/5bZHeJPV3jVBSyIYvdth1AEvmwC
xpxwkc/Qp1xJYm6oU9OSy389WKF83UhkMtuqyzMsAQ==
=2Drn
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.