* [PATCH] IPV6: Fix large packet length check
@ 2003-06-24 3:40 YOSHIFUJI Hideaki / 吉藤英明
2003-06-24 8:47 ` James Morris
0 siblings, 1 reply; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-06-24 3:40 UTC (permalink / raw)
To: davem; +Cc: netdev, yoshfuji
Hello.
There were two errors in length check in the output path.
We could not send large packet (65535bytes).
This patch fixes the problem.
Patch against [PATCH] IPV6: use macro for maximum payload length patch.
Thanks.
--- linux-2.5+advmss+magic/net/ipv6/ip6_output.c.orig Tue Jun 24 12:34:12 2003
+++ linux-2.5+advmss+magic/net/ipv6/ip6_output.c Tue Jun 24 12:32:34 2003
@@ -1265,7 +1265,7 @@
maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen - sizeof(struct frag_hdr);
if (mtu <= sizeof(struct ipv6hdr) + IPV6_MAXPLEN) {
- if (inet->cork.length + length > IPV6_MAXPLEN - fragheaderlen) {
+ if (inet->cork.length + length > sizeof(struct ipv6hdr) + IPV6_MAXPLEN - fragheaderlen) {
ipv6_local_error(sk, EMSGSIZE, fl, mtu-exthdrlen);
return -EMSGSIZE;
}
@@ -1461,7 +1461,7 @@
*(u32*)hdr = fl->fl6_flowlabel | htonl(0x60000000);
- if (skb->len <= IPV6_MAXPLEN)
+ if (skb->len <= sizeof(struct ipv6hdr) + IPV6_MAXPLEN)
hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
else
hdr->payload_len = 0;
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] IPV6: Fix large packet length check
2003-06-24 3:40 [PATCH] IPV6: Fix large packet length check YOSHIFUJI Hideaki / 吉藤英明
@ 2003-06-24 8:47 ` James Morris
2003-06-24 21:51 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: James Morris @ 2003-06-24 8:47 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / 吉藤英明
Cc: David S. Miller, netdev
On Tue, 24 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] ^[$B5HF#1QL@^[(B wrote:
> This patch fixes the problem.
> Patch against [PATCH] IPV6: use macro for maximum payload length patch.
I've applied both of these to bk://kernel.bkbits.net/jmorris/net-2.5
- James
--
James Morris
<jmorris@intercode.com.au>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IPV6: Fix large packet length check
2003-06-24 8:47 ` James Morris
@ 2003-06-24 21:51 ` David S. Miller
0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2003-06-24 21:51 UTC (permalink / raw)
To: jmorris; +Cc: yoshfuji, netdev
From: James Morris <jmorris@intercode.com.au>
Date: Tue, 24 Jun 2003 18:47:26 +1000 (EST)
On Tue, 24 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] ^[$B5HF#1QL@^[(B wrote:
> This patch fixes the problem.
> Patch against [PATCH] IPV6: use macro for maximum payload length patch.
I've applied both of these to bk://kernel.bkbits.net/jmorris/net-2.5
Thanks James, I've pulled them.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-06-24 21:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-24 3:40 [PATCH] IPV6: Fix large packet length check YOSHIFUJI Hideaki / 吉藤英明
2003-06-24 8:47 ` James Morris
2003-06-24 21:51 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).