+ }
+
+ struct ip6_hdr *ip6 = mtod(state->m, struct ip6_hdr *);
+
+ struct sockaddr_in6 src = {};
+ src.sin6_family = AF_INET6;
+ src.sin6_len = sizeof(src);
+ memcpy(&src.sin6_addr, &ip6->ip6_src, sizeof(src.sin6_addr));
+
+ struct sockaddr_in6 dst = {};
+ dst.sin6_family = AF_INET6;
+ dst.sin6_len = sizeof(dst);
+ memcpy(&dst.sin6_addr, &ip6->ip6_dst, sizeof(dst.sin6_addr));
+
+ sav = key_alloc_outbound_sav_for_interface(interface, AF_INET6,
+ (struct sockaddr *)&src,
+ (struct sockaddr *)&dst);