X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/7cd79da096ced70c89af673bc0c87990eaa68528..f43df819b3b11fa95a68f6feb58070268d40b1a8:/tun-linux.c diff --git a/tun-linux.c b/tun-linux.c index bf449300..3cfa5d72 100644 --- a/tun-linux.c +++ b/tun-linux.c @@ -68,7 +68,7 @@ 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 read-error -- %s", t->ifn, strerror(errno)); + a_warn("TUN", "%s", t->ifn, "read-error", "?ERRNO", A_END); return; } IF_TRACING(T_TUNNEL, { @@ -108,7 +108,9 @@ static tunnel *t_create(peer *p) tunnel *t; if ((fd = open("/dev/net/tun", O_RDWR)) < 0) { - a_warn("TUN - open-error /dev/net/tun -- %s", strerror(errno)); + a_warn("TUN", "-", "linux", + "open-error", "/dev/net/tun", "?ERRNO", + A_END); return (0); } fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC); @@ -116,7 +118,7 @@ static tunnel *t_create(peer *p) iff.ifr_name[0] = 0; iff.ifr_flags = IFF_TUN | IFF_NO_PI; if ((f = ioctl(fd, TUNSETIFF, &iff)) < 0) { - a_warn("TUN - linux config-error -- %s", strerror(errno)); + a_warn("TUN", "-", "linux", "config-error", "?ERRNO", A_END); close(fd); return (0); }