]> git.ipfire.org Git - thirdparty/openvpn.git/commit
verb 5 logging wrongly reports received bytes
authorDavid Sommerseth <dazo@users.sourceforge.net>
Fri, 19 Feb 2010 16:32:56 +0000 (17:32 +0100)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Tue, 27 Apr 2010 21:07:36 +0000 (23:07 +0200)
commit40d1b64e3c69c58fb9ed4f1c0d1162cfe22e6f28
tree20c924d93dd133c34f2870a4606fe27568cc9d80
parent2e87a292e9428b08830b057e22fa9f80bc98971b
verb 5 logging wrongly reports received bytes

With --verb 5, openvpn logs a single letter (rwRW) for each package
received or sent. I recently ran into a problem with the tun device on
Linux where the read from that device returned 0. Unfortunately this was
also logged as "r", which made me assume that openvpn had received
something, while it actually hadn't.

(See https://dev.openwrt.org/ticket/6650 for the bug that made me find out
about this problem with openvpn.)

I'm attaching a patch which prevents openvpn from logging "r" or "R" when
it didn't actually read anything. This is against openvpn 2.1-rc20, but
probably still applies to the most recent version.

This patch was received anonymously via the sf.net bug tracker:
<http://sourceforge.net/tracker/?func=detail&atid=454719&aid=2951003&group_id=48978>

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
forward.c