diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-08-29 15:28:14 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-29 15:32:26 +0200 |
commit | 39e9af96662eabc6fbe332dcb8e7b70ccaceaceb (patch) | |
tree | 1cc33a894d86a6e5f5fd188247eabb58bda9be07 /src/libipsec | |
parent | 55e05aa226f85cfcc9267f3f41d17a5e5a6bf80e (diff) | |
download | strongswan-39e9af96662eabc6fbe332dcb8e7b70ccaceaceb.tar.bz2 strongswan-39e9af96662eabc6fbe332dcb8e7b70ccaceaceb.tar.xz |
struct iphdr is Linux specific use struct ip instead
Diffstat (limited to 'src/libipsec')
-rw-r--r-- | src/libipsec/ip_packet.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libipsec/ip_packet.c b/src/libipsec/ip_packet.c index 4593ba5c8..52aeaa209 100644 --- a/src/libipsec/ip_packet.c +++ b/src/libipsec/ip_packet.c @@ -130,19 +130,19 @@ ip_packet_t *ip_packet_create(chunk_t packet) { case 4: { - struct iphdr *ip; + struct ip *ip; - if (packet.len < sizeof(struct iphdr)) + if (packet.len < sizeof(struct ip)) { DBG1(DBG_ESP, "IPv4 packet too short"); goto failed; } - ip = (struct iphdr*)packet.ptr; + ip = (struct ip*)packet.ptr; src = host_create_from_chunk(AF_INET, - chunk_from_thing(ip->saddr), 0); + chunk_from_thing(ip->ip_src), 0); dst = host_create_from_chunk(AF_INET, - chunk_from_thing(ip->daddr), 0); - next_header = ip->protocol; + chunk_from_thing(ip->ip_dst), 0); + next_header = ip->ip_p; break; } #ifdef HAVE_NETINET_IP6_H |