return;
}
IF_TRACING(T_TUNNEL, {
- trace(T_TUNNEL, "tunnel: packet arrived");
- trace_block(T_PACKET, "tunnel: packet contents", buf_i, n);
+ trace(T_TUNNEL, "tun-linux: packet arrived");
+ trace_block(T_PACKET, "tun-linux: packet contents", buf_i, n);
})
buf_init(&b, buf_i, n);
p_tun(t->p, &b);
return (0);
}
fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC);
+ memset(&iff, 0, sizeof(iff));
iff.ifr_name[0] = 0;
iff.ifr_flags = IFF_TUN | IFF_NO_PI;
if ((f = ioctl(fd, TUNSETIFF, &iff)) < 0) {
sel_addfile(&t->f);
iff.ifr_name[IFNAMSIZ - 1] = 0;
strcpy(t->ifn, iff.ifr_name);
- T( trace(T_TUNNEL, "tunnel: attached interface %s to peer `%s'",
+ T( trace(T_TUNNEL, "tun-linux: attached interface %s to peer `%s'",
t->ifn, p_name(p)); )
return (t);
}
static void t_inject(tunnel *t, buf *b)
{
IF_TRACING(T_TUNNEL, {
- trace(T_TUNNEL, "tunnel: inject decrypted packet");
+ 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));