bug in Packet::take() ?

Juan Luis Baptiste juancho at linuxmail.org
Mon Nov 25 02:30:43 EST 2002


Eddie,

I resolved the problem I was having with Packet::take() in my element. The problem wasn't in take, it was in the updating of seq. numbers after the translation of a packet, when the size of the new packet was smaller than the old one. I wasn't updating the ack number correctly in this case, so the ftp client was resending to the ftp server the number of bytes that the packet shrinked, because of the bad ack number. 

That was why it seemed that take wasn't removing those bytes.


Cheers,

Juan Luis.


----- Original Message -----
From: Eddie Kohler <kohler at icir.org> 
Date: Thu, 31 Oct 2002 10:23:10 -0800
To: "Juan Luis Baptiste" <juancho at linuxmail.org>
Subject: Re: bug in Packet::take() ? 

OK, I've looked at your code. So your click_chatter() is not a reliable way
to tell whether the Packet::take() has succeeded. Remember that "%s" prints
a null-terminated string. You haven't added a null character so what it
prints could easily go off the end of the packet.

>  click_chatter("data2= %s<-",data2);

Use IPPrint to see what the packet really contains.

Eddie

-- 
______________________________________________
http://www.linuxmail.org/
Now with POP3/IMAP access for only US$19.95/yr

Powered by Outblaze




More information about the click mailing list