summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-13 21:32:26 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:53:35 -0800
commit0148894223740da4818d7f4e6f92cbb5481a25b8 (patch)
treebe37af4b8c3c81b45c7fff28ff7b6f09c78e2ef0 /net/ipv6/ip6_output.c
parentb24b8a247ff65c01b252025926fe564209fae4fc (diff)
downloadop-kernel-dev-0148894223740da4818d7f4e6f92cbb5481a25b8.zip
op-kernel-dev-0148894223740da4818d7f4e6f92cbb5481a25b8.tar.gz
[IPV6]: Only set nfheader_len for top xfrm dst
We only need to set nfheader_len in the top xfrm dst. This is because we only ever read the nfheader_len from the top xfrm dst. It is also easier to count nfheader_len as part of header_len which then lets us remove the ugly wrapper functions for incrementing and decrementing header lengths in xfrm6_policy.c. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 3bef30e..1506157 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1098,7 +1098,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
inet->cork.length = 0;
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
- exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
+ exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0) -
+ rt->u.dst.nfheader_len;
length += exthdrlen;
transhdrlen += exthdrlen;
} else {
OpenPOWER on IntegriCloud