This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ecos: tcp/ip stack implementation error
- From: "Gary D. Thomas" <gary dot thomas at mind dot be>
- To: 张 亮 <johnsonest at hotmail dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 19 Feb 2003 07:15:14 -0700
- Subject: Re: [ECOS] ecos: tcp/ip stack implementation error
- References: <F7qNgsPHjxSfHkdrG500002e306@hotmail.com>
On Wed, 2003-02-19 at 00:32, 张 亮 wrote:
> Hi,
> i am willing to show a implementation error in ecos tcp/ip stack:
> as for tcp urgent pointer,when urp >65496(not 65535),urp should be
> 65535.because 65536-20(iphdr)-20(tcphdr)=65496.
> following is ecos code:
> u_int32_t urp = tp->snd_up - tp->snd_nxt;
> if (urp > IP_MAXPACKET)//65535
> urp = IP_MAXPACKET;
>
> it should like this:
> if(urp > IP_MAXPACKET-sizeof(struct tcpip))
> urp = IP_MAXPACKET;
Interesting. Do you have a test case which shows this to be
in error, or are you just conjecturing? What file is this in?
If it's in one of the *BSD stacks, I'd be surprised that it
hadn't been fixed yet.
note: a proper patch would be the way to show what really needs
to be changed.
--
.--------------------------------------------------------.
| Mind: Embedded Linux and eCos Development |
|--------------------------------------------------------|
| Gary Thomas email: gary dot thomas at mind dot be |
| Mind ( http://mind.be ) tel: +1 (970) 229-1963 |
| gpg: http://www.chez-thomas.org/gary/gpg_key.asc |
'--------------------------------------------------------'
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss