X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/b4e566689f469cc1cffe99e50e16a346d0f9832d..3cdc3f3a27e8c4f4fe692009d868c773d298a68c:/tun-linux.c diff --git a/tun-linux.c b/tun-linux.c index c30784d7..6aa5adb4 100644 --- a/tun-linux.c +++ b/tun-linux.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: tun-linux.c,v 1.3 2004/04/08 01:36:17 mdw Exp $ + * $Id$ * * Tunnel interface based on Linux TUN/TAP driver * @@ -57,7 +57,7 @@ static void t_read(int fd, unsigned mode, void *v) n = read(fd, buf_i, sizeof(buf_i)); if (n < 0) { - a_warn("tunnel read failed (%s): %s", t->ifn, strerror(errno)); + a_warn("TUN %s read-error -- %s", t->ifn, strerror(errno)); return; } IF_TRACING(T_TUNNEL, { @@ -100,15 +100,14 @@ int tun_create(tunnel *t, peer *p) struct ifreq iff; if ((fd = open("/dev/net/tun", O_RDWR)) < 0) { - a_warn("open `/dev/net/tun' failed: %s", strerror(errno)); + a_warn("TUN - open-error /dev/net/tun -- %s", strerror(errno)); return (-1); } fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC); iff.ifr_name[0] = 0; iff.ifr_flags = IFF_TUN; if ((f = ioctl(fd, TUNSETIFF, &iff)) < 0) { - a_warn("couldn't set configure new TUN/TAP interface: %s", - strerror(errno)); + a_warn("TUN - linux config-error -- %s", strerror(errno)); close(fd); return (-1); }