libipsec: Fix ip_packet_create_from_data() version field in IPv6 header
authorMatus Fabian <matfabia@cisco.com>
Mon, 19 Mar 2018 09:19:45 +0000 (02:19 -0700)
committerTobias Brunner <tobias@strongswan.org>
Mon, 19 Mar 2018 10:01:10 +0000 (11:01 +0100)
Closes strongswan/strongswan#92.

Signed-off-by: Matus Fabian <matfabia@cisco.com>
src/libipsec/ip_packet.c

index 904f118..d85bc96 100644 (file)
@@ -527,7 +527,7 @@ ip_packet_t *ip_packet_create_from_data(host_t *src, host_t *dst,
                case AF_INET6:
                {
                        struct ip6_hdr ip = {
-                               .ip6_flow = htonl(6),
+                               .ip6_flow = htonl(6 << 28),
                                .ip6_plen = htons(data.len),
                                .ip6_nxt = next_header,
                                .ip6_hlim = 0x80,