Opened 3 years ago

Closed 3 years ago

#1341 closed Bug / Defect (duplicate)

Line numbering in error messages/log is wrong

Reported by: hildeb Owned by:
Priority: major Milestone: RC 2.3
Component: Generic / unclassified Version:
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

Connections using my working 2.4.x config issue some warnings (that's
expected!), but the warnings make no sense:

2020-10-19 18:49:45 Option 'key-direction' in charite-hildeb.ovpn:33 is ignored by previous <connection> blocks
2020-10-19 18:49:45 Option 'tls-auth' in charite-hildeb.ovpn:34 is ignored by previous <connection> blocks
2020-10-19 18:49:45 OpenVPN 2.5_rc3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 30 2020

here goes my config:

1  # Konfiguration fuer Charite-OpenVPN
2  client
3  dev tun
4
5  # hostname v4/udp
6  <connection>
7  proto udp
8  remote somehost.charite.de
9  port 1194
10 explicit-exit-notify
11 nobind
12</connection>
13
14 # hostname v4/tcp
15 <connection>
16 proto tcp
17 remote somehost.charite.de
18 port 1194
19 nobind
20 </connection>
21
22 # ausfall v4
23 <connection>
24 proto udp
25 remote 217.199.x.y
26 port 1194
27 explicit-exit-notify
28 nobind
29 </connection>
30
31 resolv-retry infinite
32
33 cipher AES-256-CBC
34 data-ciphers AES-256-CBC
35 auth SHA256
36 remote-cert-tls server

... etc. ...

As you can see, line 33 and 34 don't even contain "key-direction" OR "tls-auth"!

Some lines do, though:

$ cat -n charite-hildeb.ovpn |egrep "(key-direction|tls-auth)"
50 key-direction 1
51 <tls-auth>
73 </tls-auth>

Change History (2)

comment:1 Changed 3 years ago by Selva Nair

see ticket #1325

comment:2 Changed 3 years ago by Gert Döring

Resolution: duplicate
Status: newclosed

Ralf, I assume that this is the same as #1325 (as Selva already remarked). If there are inline config blocks, the code just forgets to count these numbers - so if you have 10 lines of "<tls-auth>/.../</tls-auth>", all error reporting after that block is off by -10.

And I just committed a fix to 2.4-to-be-.10, 2.5-to-be-.1 and master :-)

So, closing this ticket, as duplicate.

(And yes, we knew before 2.5.0 release, but considered this to be minor enough to not hold up the release - it needed some arguments about "how to do this nicely?" which got settled today. And since it was not *really* important, Antonio and I let this drag a bit)

Note: See TracTickets for help on using tickets.