| To: | tgraf@xxxxxxx, davem@xxxxxxxxxx, jmorris@xxxxxxxxxxxxxxxx |
|---|---|
| Subject: | Re: [PATCH] IPV6: fix data offset calculation when pushing frag options {dst1opts|auth} |
| From: | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> |
| Date: | Fri, 11 Jul 2003 09:18:14 +0900 (JST) |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <20030710234449.GB30577@rei.rakuen> |
| Organization: | USAGI Project |
| References: | <20030710234449.GB30577@rei.rakuen> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
In article <20030710234449.GB30577@xxxxxxxxxx> (at Fri, 11 Jul 2003 01:44:49
+0200), Thomas Graf <tgraf@xxxxxxx> says:
> yoshfuji agreed on this.
I agreed, but
> - exthdrlen += opt ? opt->opt_flen : 0;
> + exthdrlen = rt->u.dst.header_len + opt ? opt->opt_flen : 0;
Well, sorry, this was wrong.
D: fix offset of payload with extension header.
D: based on patch from Thomas Graf <tgraf@xxxxxxx>
Index: linux-2.5/net/ipv6/ip6_output.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/ipv6/ip6_output.c,v
retrieving revision 1.33
diff -u -r1.33 ip6_output.c
--- linux-2.5/net/ipv6/ip6_output.c 9 Jul 2003 05:55:17 -0000 1.33
+++ linux-2.5/net/ipv6/ip6_output.c 10 Jul 2003 22:50:33 -0000
@@ -1247,11 +1247,9 @@
inet->cork.length = 0;
inet->sndmsg_page = NULL;
inet->sndmsg_off = 0;
- if ((exthdrlen = rt->u.dst.header_len) != 0) {
- length += exthdrlen;
- transhdrlen += exthdrlen;
- }
- exthdrlen += opt ? opt->opt_flen : 0;
+ exthdrlen += rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
+ length += exthdrlen;
+ transhdrlen += exthdrlen;
} else {
rt = np->cork.rt;
if (inet->cork.flags & IPCORK_OPT)
--yoshfuji
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: 2.4.21+ - IPv6 over IPv4 tunneling b0rked, Mika Liljeberg |
|---|---|
| Next by Date: | Re: [PATCH] IPV6: fix data offset calculation when pushing frag options {dst1opts|auth}, YOSHIFUJI Hideaki / 吉藤英明 |
| Previous by Thread: | [PATCH] IPV6: fix data offset calculation when pushing frag options {dst1opts|auth}, Thomas Graf |
| Next by Thread: | Re: [PATCH] IPV6: fix data offset calculation when pushing frag options {dst1opts|auth}, YOSHIFUJI Hideaki / 吉藤英明 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |