X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/388e0319a0faf48193658c82228133bd1ea24eb6..a571143bb22f1d32cb70e5b62dd07cab529efea1:/server/tun-linux.c diff --git a/server/tun-linux.c b/server/tun-linux.c index b8705802..33451746 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, { @@ -124,11 +125,13 @@ static tunnel *t_create(peer *p, int fd, char **ifn) static void t_inject(tunnel *t, buf *b) { + int hunoz; + IF_TRACING(T_TUNNEL, { trace(T_TUNNEL, "tun-linux: inject decrypted packet"); trace_block(T_PACKET, "tunnel: packet contents", BBASE(b), BLEN(b)); }) - write(t->f.fd, BBASE(b), BLEN(b)); + hunoz = write(t->f.fd, BBASE(b), BLEN(b)); } /* --- @t_destroy@ --- *