Commit bee0b40c authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[IPSEC] beet: Fix extension header support on output

The beet output function completely kills any extension headers by replacing
them with the IPv6 header.  This is because it essentially ignores the
result of ip6_find_1stfragopt by simply acting as if there aren't any
extension headers.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8bd17075
......@@ -44,9 +44,9 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb)
hdr_len = ip6_find_1stfragopt(skb, &prevhdr);
memmove(skb->data, iph, hdr_len);
skb_set_mac_header(skb, offsetof(struct ipv6hdr, nexthdr));
skb_set_mac_header(skb, (prevhdr - x->props.header_len) - skb->data);
skb_reset_network_header(skb);
skb_set_transport_header(skb, sizeof(struct ipv6hdr));
skb_set_transport_header(skb, hdr_len);
top_iph = ipv6_hdr(skb);
ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment