summaryrefslogtreecommitdiffstats
path: root/src/openvpn/route.c
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-11-29 14:16:12 +0100
committerDavid Sommerseth <davids@redhat.com>2012-11-29 21:44:30 +0100
commitb3f19cc4bec6978a128f5af3ab22d8cfa954b064 (patch)
tree6918bb98b1858e521463ee2c26ada3cbe3286582 /src/openvpn/route.c
parentb2b66179f6dcc37de9582d5c3044f0357dda3df3 (diff)
downloadopenvpn-b3f19cc4bec6978a128f5af3ab22d8cfa954b064.tar.gz
openvpn-b3f19cc4bec6978a128f5af3ab22d8cfa954b064.tar.xz
openvpn-b3f19cc4bec6978a128f5af3ab22d8cfa954b064.zip
The get_default_gateway() function uses warn() instead of msg()
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. Reported-by: Thomas Steen Rasmussen <thomas@gibfest.dk> Tested-by: Thomas Steen Rasmussen <thomas@gibfest.dk> Signed-off-by: David Sommerseth <davids@redhat.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: 1354194972-5388-1-git-send-email-dazo@users.sourceforge.net URL: http://article.gmane.org/gmane.network.openvpn.devel/7149
Diffstat (limited to 'src/openvpn/route.c')
-rw-r--r--src/openvpn/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 8c3d0dc..dd69d8e 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -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;