chiark
/
gitweb
/
~mdw
/
tripe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
admin, resolve ops bugfix: initialize tag in resop early.
[tripe]
/
tun-linux.c
diff --git
a/tun-linux.c
b/tun-linux.c
index bf44930049bd02ba583e0eb0ef396d63d4d71d4f..3cfa5d72d03778362fc59eef55163f606e7d8b04 100644
(file)
--- 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) {
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, {
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) {
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);
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) {
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);
}
close(fd);
return (0);
}