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/ dco_do_write: 
peer-id 0, len=390
2022-12-27 11:05:41 us=111931 something/ dco_update_keys: 
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/ TCPv6_SERVER READ 
[22] from [AF_INET6]::ffff: P_ACK_V1 kid=0 [ 5 ] DATA len=0
2022-12-27 11:05:42 us=267059 something/ dco_update_keys: 
2022-12-27 11:05:43 us=423410 something/ dco_update_keys: 
2022-12-27 11:05:58 us=584121 something/ dco_update_keys: 

... 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

  #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.


"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

Reply via email to