diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-07-14 11:47:06 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-08 15:41:03 +0200 |
commit | b6a071514a4af2902048ad1883e8e7ae701538af (patch) | |
tree | 1f3bdb568197720d6b17926f921629bd5d71744e /src/libipsec | |
parent | 34400edc37febf3efe41f5c7c111ab93d3abe6c1 (diff) | |
download | strongswan-b6a071514a4af2902048ad1883e8e7ae701538af.tar.bz2 strongswan-b6a071514a4af2902048ad1883e8e7ae701538af.tar.xz |
Fixed ip_packet_t if IPv6 is not available
Diffstat (limited to 'src/libipsec')
-rw-r--r-- | src/libipsec/ip_packet.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libipsec/ip_packet.c b/src/libipsec/ip_packet.c index c78c238c4..4593ba5c8 100644 --- a/src/libipsec/ip_packet.c +++ b/src/libipsec/ip_packet.c @@ -21,7 +21,9 @@ #include <netinet/in.h> #include <netinet/ip.h> +#ifdef HAVE_NETINET_IP6_H #include <netinet/ip6.h> +#endif typedef struct private_ip_packet_t private_ip_packet_t; @@ -143,6 +145,7 @@ ip_packet_t *ip_packet_create(chunk_t packet) next_header = ip->protocol; break; } +#ifdef HAVE_NETINET_IP6_H case 6: { struct ip6_hdr *ip; @@ -159,6 +162,7 @@ ip_packet_t *ip_packet_create(chunk_t packet) chunk_from_thing(ip->ip6_dst), 0); next_header = ip->ip6_nxt; } +#endif /* HAVE_NETINET_IP6_H */ default: DBG1(DBG_ESP, "unsupported IP version"); goto failed; |