mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-16 21:29:20 +02:00
Use bsd ip.h header instead
This commit is contained in:
parent
05927b97e4
commit
c6a67d340e
|
@ -134,7 +134,7 @@ static int
|
||||||
tunnel_tun(int tun_fd, int dns_fd)
|
tunnel_tun(int tun_fd, int dns_fd)
|
||||||
{
|
{
|
||||||
unsigned long outlen;
|
unsigned long outlen;
|
||||||
struct iphdr *header;
|
struct ip *header;
|
||||||
char out[64*1024];
|
char out[64*1024];
|
||||||
char in[64*1024];
|
char in[64*1024];
|
||||||
int userid;
|
int userid;
|
||||||
|
@ -144,8 +144,8 @@ tunnel_tun(int tun_fd, int dns_fd)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* find target ip in packet, in is padded with 4 bytes TUN header */
|
/* find target ip in packet, in is padded with 4 bytes TUN header */
|
||||||
header = (struct iphdr*) (in + 4);
|
header = (struct ip*) (in + 4);
|
||||||
userid = find_user_by_ip(header->daddr);
|
userid = find_user_by_ip(header->ip_dst.s_addr);
|
||||||
if (userid < 0)
|
if (userid < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue