server/tun-*.c: Include tunnel name in read-error warnings.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 22 May 2010 11:33:19 +0000 (12:33 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 22 May 2010 11:44:25 +0000 (12:44 +0100)
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
server/tun-linux.c
server/tun-slip.c
server/tun-unet.c

index bfa528b..6773ee6 100644 (file)
@@ -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, {
index b870580..2794ca8 100644 (file)
@@ -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, {
index 264d1d4..609829f 100644 (file)
@@ -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) {
index d4b4cf3..11f9b67 100644 (file)
@@ -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, {