mirror of
https://github.com/yarrick/iodine.git
synced 2025-04-11 21:10:56 +00:00
---
This commit is contained in:
parent
d0acc7fd34
commit
df7e4dac74
2 changed files with 5 additions and 0 deletions
|
@ -571,6 +571,8 @@ tunnel_tun(int tun_fd, int dns_fd)
|
||||||
userid = find_user_by_ip6(header6->ip6_dst);
|
userid = find_user_by_ip6(header6->ip6_dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pritnf("tunnel_tun() - userid = %d", userid);
|
||||||
|
|
||||||
if (userid < 0)
|
if (userid < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -1768,6 +1770,8 @@ handle_full_packet(int tun_fd, int dns_fd, int userid)
|
||||||
touser = find_user_by_ip6(hdr->ip6_dst);
|
touser = find_user_by_ip6(hdr->ip6_dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("handle_full_packet() - touser = %d, version = %d", touser, hdr->ip_v);
|
||||||
|
|
||||||
if (touser == -1) {
|
if (touser == -1) {
|
||||||
/* send the uncompressed packet to tun device */
|
/* send the uncompressed packet to tun device */
|
||||||
write_tun(tun_fd, out, outlen, hdr->ip_v);
|
write_tun(tun_fd, out, outlen, hdr->ip_v);
|
||||||
|
|
|
@ -365,6 +365,7 @@ close_tun(int tun_fd)
|
||||||
int
|
int
|
||||||
write_tun(int tun_fd, unsigned char *data, size_t len, char version)
|
write_tun(int tun_fd, unsigned char *data, size_t len, char version)
|
||||||
{
|
{
|
||||||
|
printf("write_tun() - version = %d", version);
|
||||||
#if defined (FREEBSD) || defined (DARWIN) || defined(NETBSD) || defined(WINDOWS32)
|
#if defined (FREEBSD) || defined (DARWIN) || defined(NETBSD) || defined(WINDOWS32)
|
||||||
data += 4;
|
data += 4;
|
||||||
len -= 4;
|
len -= 4;
|
||||||
|
|
Loading…
Add table
Reference in a new issue