From c6a67d340efbcfaf45da4f451941a200458963cf Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sun, 11 Feb 2007 10:42:57 +0000 Subject: [PATCH] Use bsd ip.h header instead --- src/iodined.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iodined.c b/src/iodined.c index b51b5b9..862734c 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -134,7 +134,7 @@ static int tunnel_tun(int tun_fd, int dns_fd) { unsigned long outlen; - struct iphdr *header; + struct ip *header; char out[64*1024]; char in[64*1024]; int userid; @@ -144,8 +144,8 @@ tunnel_tun(int tun_fd, int dns_fd) return 0; /* find target ip in packet, in is padded with 4 bytes TUN header */ - header = (struct iphdr*) (in + 4); - userid = find_user_by_ip(header->daddr); + header = (struct ip*) (in + 4); + userid = find_user_by_ip(header->ip_dst.s_addr); if (userid < 0) return 0;