diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-10-10 18:42:23 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:53 -0400 |
commit | bee0b40c0621396326d1c17b81833f59118a2d80 (patch) | |
tree | 94a79cef5ba189cda8e6cad2acd720da34c0463c /net/ipv6/xfrm6_mode_beet.c | |
parent | 8bd170750400bfa5e14c3dd2e2d0f305e1ab0e57 (diff) |
[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: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/xfrm6_mode_beet.c')
-rw-r--r-- | net/ipv6/xfrm6_mode_beet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index 65e6b2a7fb3..d9366dfbf86 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_mode_beet.c | |||
@@ -44,9 +44,9 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
44 | hdr_len = ip6_find_1stfragopt(skb, &prevhdr); | 44 | hdr_len = ip6_find_1stfragopt(skb, &prevhdr); |
45 | memmove(skb->data, iph, hdr_len); | 45 | memmove(skb->data, iph, hdr_len); |
46 | 46 | ||
47 | skb_set_mac_header(skb, offsetof(struct ipv6hdr, nexthdr)); | 47 | skb_set_mac_header(skb, (prevhdr - x->props.header_len) - skb->data); |
48 | skb_reset_network_header(skb); | 48 | skb_reset_network_header(skb); |
49 | skb_set_transport_header(skb, sizeof(struct ipv6hdr)); | 49 | skb_set_transport_header(skb, hdr_len); |
50 | top_iph = ipv6_hdr(skb); | 50 | top_iph = ipv6_hdr(skb); |
51 | 51 | ||
52 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); | 52 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); |