From: Mark Wooding Date: Sat, 22 May 2010 11:33:19 +0000 (+0100) Subject: server/tun-*.c: Include tunnel name in read-error warnings. X-Git-Tag: 1.0.0pre10~7 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/b476642f0ecdb981d9f0183fb5421082d90d9071 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). --- 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, {