aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-14 00:33:32 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:37 -0500
commitb4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b (patch)
treec057ff62b03582493b74005f7959a0207e748468 /net/ipv6/ip6_output.c
parent550ade8432a2a6fbfb48ba7018750b0e8c81e8d0 (diff)
[IPV6]: Move nfheader_len into rt6_info
The dst member nfheader_len is only used by IPv6. It's also currently creating a rather ugly alignment hole in struct dst. Therefore this patch moves it from there into struct rt6_info. It also reorders the fields in rt6_info to minimize holes. 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 150615758fdc..387030d2483c 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1099,7 +1099,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
1099 sk->sk_sndmsg_page = NULL; 1099 sk->sk_sndmsg_page = NULL;
1100 sk->sk_sndmsg_off = 0; 1100 sk->sk_sndmsg_off = 0;
1101 exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0) - 1101 exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0) -
1102 rt->u.dst.nfheader_len; 1102 rt->nfheader_len;
1103 length += exthdrlen; 1103 length += exthdrlen;
1104 transhdrlen += exthdrlen; 1104 transhdrlen += exthdrlen;
1105 } else { 1105 } else {
@@ -1114,7 +1114,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
1114 1114
1115 hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); 1115 hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
1116 1116
1117 fragheaderlen = sizeof(struct ipv6hdr) + rt->u.dst.nfheader_len + (opt ? opt->opt_nflen : 0); 1117 fragheaderlen = sizeof(struct ipv6hdr) + rt->nfheader_len +
1118 (opt ? opt->opt_nflen : 0);
1118 maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen - sizeof(struct frag_hdr); 1119 maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen - sizeof(struct frag_hdr);
1119 1120
1120 if (mtu <= sizeof(struct ipv6hdr) + IPV6_MAXPLEN) { 1121 if (mtu <= sizeof(struct ipv6hdr) + IPV6_MAXPLEN) {