The get_default_gateway() function uses warn() instead of msg()
PATCH 1/1 The get_default_gateway() function uses warn() instead of msg()
From: David Sommerseth <[email protected]...>
A report on #openvpn pointed out that in his setup three warnings appeard on the console when starting up.
$ sudo /usr/local/etc/rc.d/openvpn restart
Stopping openvpn.
Waiting for PIDS: 33031.
Starting openvpn.
openvpn: writing to routing socket: No such process
openvpn: writing to routing socket: No such process
openvpn: writing to routing socket: No such process
$This setup is on FreeBSD using jails with strict access to the routing table.
After looking at the code path, this error was found in the BSD sections for get_default_gateway(). But it was using the warn() call instead of msg(M_WARN|M_ERRNO, ...) which causes these warnings to go to stderr instead of the log file.
The warning string is also slightly modified to better explain what fails.
--- src/openvpn/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/openvpn/route.c +2 -2
@@ -2701,7 +2701,7 @@ get_default_gateway (struct route_gateway_info *rgi)if (write (s, (char *)&m_rtmsg, l) <0 ) { -warn ("writing to routing socket" ); +msg (M_WARN |M_ERRNO ,"Could not retrieve default gateway from route socket:" );gc_free (&gc);close (s);return ;
@@ -3067,7 +3067,7 @@ get_default_gateway (struct route_gateway_info *rgi)if (write (s, (char *)&m_rtmsg, l) <0 ) { -warn ("writing to routing socket" ); +msg (M_WARN |M_ERRNO ,"Could not retrieve default gateway from route socket:" );gc_free (&gc);close (s);return ;
Signature · 1 line
1.7.10.2
Hi,
Quoted 4 lines · David Sommerseth
From: David Sommerseth <[email protected]...>
A report on #openvpn pointed out that in his setup three warnings appeard on the console when starting up.
ACK.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...David Sommerseth
AppliedQuoted 25 lines · David Sommerseth
From: David Sommerseth <[email protected]...>
A report on #openvpn pointed out that in his setup three warnings appeard on the console when starting up.
$ sudo /usr/local/etc/rc.d/openvpn restart Stopping openvpn. Waiting for PIDS: 33031. Starting openvpn. openvpn: writing to routing socket: No such process openvpn: writing to routing socket: No such process openvpn: writing to routing socket: No such process $This setup is on FreeBSD using jails with strict access to the routing table.
After looking at the code path, this error was found in the BSD sections for
get_default_gateway(). But it was using thewarn()call instead ofmsg(M_WARN|M_ERRNO, ...)which causes these warnings to go to stderr instead of the log file.The warning string is also slightly modified to better explain what fails.
Quoted 7 lines
Reported-by Thomas Steen Rasmussen <[email protected]...>Signed-off-by David Sommerseth <[email protected]...>--- src/openvpn/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master and beta/2.3 branches
commit b3f19cc4bec6978a128f5af3ab22d8cfa954b064 (master) commit 28d9e57638d66fde792a53a3eb6391ddb8bb426f (beta/2.3)
Author: David Sommerseth <[email protected]...> Date: Thu Nov 29 14:16:12 2012 +0100
The get_default_gateway() function uses warn() instead of msg()
Reported-by: Thomas Steen Rasmussen <[email protected]...>
Tested-by: Thomas Steen Rasmussen <[email protected]...>
Signed-off-by: David Sommerseth <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/7149Signature · 3 lines
kind regards, David Sommerseth