Reply-To: "Jean-Paul ROUBELAT" From: "Jean-Paul ROUBELAT" To: "Craig Small" References: Subject: rspfd again Date: Mon, 24 Jan 2000 22:19:46 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Hi Craig, I worked a bit more on rspfd 1.0. It now almost work. Some comments on the checksum computation routine which gave me the problems : Hi Craig, I worked a little bit more on rspf 1.0 and found some possible problems in the checksum routine. It explains why no packet were accepted here. --- unsigned short rspf_check(unsigned char *rh, int len, unsigned long saddr, unsigned long daddr) { unsigned long sum; unsigned short *sp; int i; sp = (unsigned short*)rh; /* Zero the checksum */ sum = 0; /* Source address */ sum += (saddr & 0xffff); sum += (saddr < 16 ); <<- should be sum += (saddr >> 16 ) ? sum += (daddr & 0xffff); sum += (daddr < 16); <<- IDEM sum += IPPROTO_UDP; for(i=0;i> 16) + (sum & 0xffff); sum += (sum >> 16); <<- just done before ? return (unsigned short)(~sum & 0xffff); } 73, ----------------------------------------------------------------------- Jean-Paul ROUBELAT - F6FBB | Computers are like air-conditioners : Packet: F6FBB@F6FBB.FMLR.FRA.EU | they stop working properly as soon as Email : jpr@f6fbb.org | you open windows. WEB : http://www.f6fbb.org | -----------------------------------------------------------------------