ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.18k stars 930 forks source link

Fixed coredump #997

Closed small-5 closed 2 years ago

small-5 commented 2 years ago

Fixed https://github.com/ntop/n2n/issues/991

hamishcoleman commented 2 years ago

Thanks!

Can you share how you found the fault? I would like to have a reproducible test case to try.

Logan007 commented 2 years ago

Hey @small-5 , good to see you still around!

Your PR would prevent the call to supernode_disconnect() in case of error while sending (which probably was the case before the core dump). So, I am not sure if I understand the idea behind it (but I would really like to). Could you provide some more details, please?

Did it happen on TCP or UDP or both?

small-5 commented 2 years ago

Hello,I have tried that if the wan is down, and then start edge, "failed to bind to local multicast group" will be displayed, and coredump will occur. If the wan is up and have ip, start edge and "successfully joined multicast group" will be displayed. At this time, coredump will not occur. @Logan007 nice to see you again. By comparing https://github.com/ntop/n2n/commit/009311d016bf27f40259e6bb992ce4a78af24424, I found that there is a return sent; at the end of this part(before https://github.com/ntop/n2n/commit/009311d016bf27f40259e6bb992ce4a78af24424 ,this part return sent or return -1), so after adding it, it will return to normal. However, I found that there is a new version(a274818854c01008a4106a44fd5ecd33d14091a4). I'll test it to see if it returns to normal. Thanks! 1