[ECOS] ecos: tcp/ip stack implementation error
张 亮
johnsonest@hotmail.com
Wed Feb 19 07:32:00 GMT 2003
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;
BRS/johnsonest
_________________________________________________________________
Ãëê»úµÃÃ
óÃýøÃý»Ã÷£¬ÃëùÃà MSN Messenger: http://messenger.msn.com/cn
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list