From b476642f0ecdb981d9f0183fb5421082d90d9071 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 22 May 2010 12:33:19 +0100 Subject: [PATCH] server/tun-*.c: Include tunnel name in read-error warnings. For some reason, all of these messages omit the tunnel name, which is contrary to the documentation (and unlike all of the other tunnel warning messages). --- server/tun-bsd.c | 3 ++- server/tun-linux.c | 3 ++- server/tun-slip.c | 3 ++- server/tun-unet.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/server/tun-bsd.c b/server/tun-bsd.c index bfa528b2..6773ee64 100644 --- a/server/tun-bsd.c +++ b/server/tun-bsd.c @@ -59,7 +59,8 @@ static void t_read(int fd, unsigned mode, void *v) n = read(fd, buf_i, sizeof(buf_i)); if (n < 0) { - a_warn("TUN", "%s", p_ifname(t->p), "read-error", "?ERRNO", A_END); + a_warn("TUN", "%s", p_ifname(t->p), "bsd", + "read-error", "?ERRNO", A_END); return; } IF_TRACING(T_TUNNEL, { diff --git a/server/tun-linux.c b/server/tun-linux.c index b8705802..2794ca8c 100644 --- a/server/tun-linux.c +++ b/server/tun-linux.c @@ -65,7 +65,8 @@ static void t_read(int fd, unsigned mode, void *v) n = read(fd, buf_i, sizeof(buf_i)); if (n < 0) { - a_warn("TUN", "%s", p_ifname(t->p), "read-error", "?ERRNO", A_END); + a_warn("TUN", "%s", p_ifname(t->p), "linux", + "read-error", "?ERRNO", A_END); return; } IF_TRACING(T_TUNNEL, { diff --git a/server/tun-slip.c b/server/tun-slip.c index 264d1d42..609829f5 100644 --- a/server/tun-slip.c +++ b/server/tun-slip.c @@ -93,7 +93,8 @@ static void t_read(int fd, unsigned mode, void *v) #endif errno == EAGAIN) return; - a_warn("TUN", "%s", p_ifname(t->p), "read-error", "?ERRNO", A_END); + a_warn("TUN", "%s", p_ifname(t->p), "slip", + "read-error", "?ERRNO", A_END); return; } if (!n) { diff --git a/server/tun-unet.c b/server/tun-unet.c index d4b4cf34..11f9b67b 100644 --- a/server/tun-unet.c +++ b/server/tun-unet.c @@ -65,7 +65,8 @@ static void t_read(int fd, unsigned mode, void *v) n = read(fd, buf_i, sizeof(buf_i)); if (n < 0) { - a_warn("TUN", "%s", p_ifname(t->p), "read-error", "?ERRNO", A_END); + a_warn("TUN", "%s", p_ifname(t->p), "unet", + "read-error", "?ERRNO", A_END); return; } IF_TRACING(T_TUNNEL, { -- 2.11.0