[Openswan Users] xl2tpd seems to cause packets to get mangled or disappear

Ray Overland roverland at microhardcorp.com
Mon Sep 24 12:48:41 EDT 2007


Here is a patch for call.c. It contains all the changes that were made.

Command: patch -p1 xl2tpd-1.1.11/call.c < xl2tpd.patch

119c119
<       /* if there was a short read, then see what is about */
---
 >         /* if there was a short read, then see what is about */
127,128d126
<              pos=0;
<              max=0;
140,141d137
<              pos=0;
<              max=0;
152,153c148,149
<              pos=0;
<              max=0;
---
 >                 pos=0;
 >                 max=0;
166,167c162,163
<              pos=0;
<              max=0;
---
 >                 pos=0;
 >                 max=0;
173,176c169,179
<                 if (buf->len == 0) {
<                  /* if the buffer is empty, then we have the beginning
<                   * of a packet, not the end
<                   */
---
 >                 if (buf->len >= 2) {
 >                     /* must be the end, drop the FCS */
 >                     buf->len -= 2;
 >                 }
 >                 else if (buf->len == 1) {
 >                     /* Do nothing, just return the single character*/
 >                 }
 >                 else {
 >                     /* if the buffer is empty, then we have the beginning
 >                      * of a packet, not the end
 >                     */
178,181c181
<              }
<
<                 /* must be the end, drop the FCS */
<                 buf->len -= 2;
---
 >                 }
185c185
<              /* if there is space, then insert the byte */
---
 >                 /* if there is space, then insert the byte */
213c213
<             };
---
 >             }
215,216c215,216
<           pos=0;
<           max=0;
---
 >             pos=0;
 >             max=0;


Tuomo Soini wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ray Overland wrote:
> 
>> I have discovered 3 problems in call.c in xl2tpd.
> 
> It would be easier to understand your fixes with patches.
> 
> At least I didn't understand your second fix from your explanation.
> 
> - --
> Tuomo Soini <tis at foobar.fi>
> Linux and network services
> +358 40 5240030
> Foobar Oy <http://foobar.fi/>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> 
> iD8DBQFG9QAUTlrZKzwul1ERAsb8AJ9j9lofY8XJ8FdFhwc7YhSnn0+1BACgkDY2
> 4rydcIH4bHI148pTep1w3hg=
> =ROv5
> -----END PGP SIGNATURE-----
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: roverland.vcf
Type: text/x-vcard
Size: 341 bytes
Desc: not available
Url : http://lists.openswan.org/pipermail/users/attachments/20070924/54e3c60a/attachment.vcf 


More information about the Users mailing list