Hi,

On Tue, Dec 27, 2022 at 03:24:04AM +0100, Arne Schwabe wrote:
> This enables logging the peer id in p2mp mode if dco is enabled
> and the log level is high enough

Ho hum, this does not work for me...

TLS/TCP server, DCO enabled, --verb 6...

2022-12-27 11:05:41 us=111855 something/194.97.140.21:16006 dco_do_write: 
peer-id 0, len=390
2022-12-27 11:05:41 us=111931 something/194.97.140.21:16006 dco_update_keys: 
peer_id=0
2022-12-27 11:05:42 us=173611 dco_do_read
2022-12-27 11:05:42 us=173764 ovpn-dco: received OVPN_PACKET_ATTR_PACKET, 
ifindex: 32018 peer-id: 0, len 22
2022-12-27 11:05:42 us=173825 something/194.97.140.21:16006 TCPv6_SERVER READ 
[22] from [AF_INET6]::ffff:194.97.140.21:16006: P_ACK_V1 kid=0 [ 5 ] DATA len=0
2022-12-27 11:05:42 us=267059 something/194.97.140.21:16006 dco_update_keys: 
peer_id=0
2022-12-27 11:05:43 us=423410 something/194.97.140.21:16006 dco_update_keys: 
peer_id=0
2022-12-27 11:05:58 us=584121 something/194.97.140.21:16006 dco_update_keys: 
peer_id=0

... there *should* be a peer-id somewhere in that line...

Playing around with the patch a bit, the offending piece seems to be
"mi->context.options.verbosity >= D_DCO_DEBUG" - which is unsurprising,
as D_DCO_DEBUG is not "6" but "LOGLEV(6, 69, M_DEBUG)", which translates
to 

  #define LOGLEV(log_level, mute_level, other) ((log_level) | 
ENCODE_MUTE_LEVEL(mute_level) | other)

(numerically, D_DCO_DEBUG = 1157628038)


The test for dco_enabled() works.

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                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to