CSTP reconnect segfault on HEAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-06-27 at 12:09 -0500, Jack Miller wrote:
> #0  queue_packet (q=<optimized out>, q at entry=0x62fd78, new=0x0)
>     at mainloop.c:40
> #1  0x00000000004081fb in cstp_reconnect (vpninfo=vpninfo at entry=0x62f7c0)
>     at cstp.c:535 

Thanks for the clear report. It's rare that a bug report leads me
straight to the fix, and it's nice when it happens.

The problem is in cstp_reconnect() in frame #1, and it arises because
you have --no-deflate on the command line. (Why, btw?)

On reconnect, we check if the pending packet to be sent is the special
'deflate_pkt', which contains the compressed version of a packet. If so,
we requeue the *original* packet, since the compression will reset with
the new connection.

However, the check 'vpninfo->current_ssl_pkt == vpninfo->deflate_pkt' is
still true even when both of those pointers are NULL, because there's no
pending packet to be sent and the 'deflate_pkt' was never allocated
because we aren't doing compression today. So we try to requeue the
packet, which is NULL...

Your patch was actually perfectly sufficient, but this is the better fix
which I'll push to the repository if you can confirm that it's working:


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux