[PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-05-31 Thread Wei Yongjun
When received ICMP Fragmentation Needed message, PATH MTU is always set to the 576 even if MTU in ICMP message is lager then 576. This is because of error condition in function ip_rt_frag_needed(), now if packet size of that ICMP message is less then new MTU, packet size will be used ,but RFC s

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-02 Thread Herbert Xu
Wei Yongjun <[EMAIL PROTECTED]> wrote: > When received ICMP Fragmentation Needed message, PATH MTU is always set > to the 576 even if MTU in ICMP message is lager then 576. This is > because of error condition in function ip_rt_frag_needed(), now if > packet size of that ICMP message is less the

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
When received ICMP Fragmentation Needed message, PATH MTU is always set to the 576 even if MTU in ICMP message is lager then 576. This is because of error condition in function ip_rt_frag_needed(), now if packet size of that ICMP message is less then new MTU, packet size will be used ,but RFC

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Herbert Xu
On Mon, Jun 04, 2007 at 08:39:21AM +0800, Wei Yongjun wrote: > > >Huh? The test new_mtu >= old_mtu should only hold if the sending router > >is buggy which is what the hack is for. > > Note here old_mtu is not the real old mtu, is the received message's size: > unsigned short old_mtu = ntohs(iph->

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
On Mon, Jun 04, 2007 at 08:39:21AM +0800, Wei Yongjun wrote: Huh? The test new_mtu >= old_mtu should only hold if the sending router is buggy which is what the hack is for. Note here old_mtu is not the real old mtu, is the received message's size: unsigned short old_mtu = ntohs(iph-

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Herbert Xu
On Mon, Jun 04, 2007 at 12:03:57PM +0800, Wei Yongjun wrote: > > So I want to know how the route announce a MTU larger then 576, such as > 1280? RFC says ICMP error message return as much as we can without > exceeding 576 bytes. I think there is a misunderstanding here. The RFC is talking about

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
On Mon, Jun 04, 2007 at 12:03:57PM +0800, Wei Yongjun wrote: So I want to know how the route announce a MTU larger then 576, such as 1280? RFC says ICMP error message return as much as we can without exceeding 576 bytes. I think there is a misunderstanding here. The RFC is talking a

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Herbert Xu
On Mon, Jun 04, 2007 at 12:32:49PM +0800, Wei Yongjun wrote: > > The latest kernel 2.6.21.3 also doing so. The rule to send ICMP message > limit this. > Ref to net/ipv4/icmp.c > line 433 void icmp_send(struct sk_buff *skb_in, int type, int code, > __be32 info) > line 434 { > ... > line 572/*

Re: [PATCH] Fix bug of update IPv4 PMTU when received ICMP Fragmentation Needed message

2007-06-03 Thread Wei Yongjun
I know, I misunderstand the iph->tot_len, the ICMP payload is not contained a valid ipv4 packet. I do this under IPv6, it has no problem because IPv6 does not check this. ^_^ Thank you very much. But this is not the old_mtu field that we were talking about. The old_mtu field comes from iph->t