]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Cleanup route error and debug logging on Windows
authorSelva Nair <selva.nair@gmail.com>
Fri, 20 Jan 2023 09:41:00 +0000 (04:41 -0500)
committerGert Doering <gert@greenie.muc.de>
Fri, 20 Jan 2023 17:28:48 +0000 (18:28 +0100)
commita45c201e2edcf5ccb6baea0a03145023db7f222b
treeff3e4897d79b8736f6213ff4a756e5b8654186b2
parentabad04fc8ef6c1da7dc4e976bacee9f34931adea
Cleanup route error and debug logging on Windows

Use a unified logging format for various route-methods

- Route add/delete errors are always logged with M_WARN, so
  log only additional information (succeed/exists) with D_ROUTE.

- Non-windows platforms log route errors with a prefix "ERROR:" and
  debug info with "ROUTE:". Do the same on Windows. Do not log
  errors or success multiple times.

- In add_route_ipv6, log the interface id instead of device name
  as the latter always point to the tun/tap adapter name on Windows.

Log lines prefixed with a PACKAGE_NAME "ROUTE" are unchanged.
They appear to use the same format on all platforms.

v2: rebase to master

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20230120094100.2063883-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26058.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c