ntop / n2n

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

bug fix: when edge disconnects abnormally:“ERROR: authentication error, MAC or IP address already in use or not released yet by supernode” #1066

Closed dwj0 closed 1 year ago

dwj0 commented 1 year ago

This bug started from commit: 99b6b6b66d0785bed69cada149c0a84a3c638ebe

codecov-commenter commented 1 year ago

Codecov Report

Base: 20.74% // Head: 21.20% // Increases project coverage by +0.46% :tada:

Coverage data is based on head (0d2be7a) compared to base (79bafc6). Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1066 +/- ## ========================================== + Coverage 20.74% 21.20% +0.46% ========================================== Files 47 46 -1 Lines 8447 8254 -193 ========================================== - Hits 1752 1750 -2 + Misses 6695 6504 -191 ``` | [Impacted Files](https://codecov.io/gh/ntop/n2n/pull/1066?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/sn\_utils.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3NuX3V0aWxzLmM=) | `0.00% <0.00%> (ø)` | | | [src/minilzo.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL21pbmlsem8uYw==) | `46.85% <0.00%> (-0.21%)` | :arrow_down: | | [src/edge.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2VkZ2UuYw==) | `0.00% <0.00%> (ø)` | | | [src/supernode.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3N1cGVybm9kZS5j) | `0.00% <0.00%> (ø)` | | | [tools/n2n-portfwd.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-dG9vbHMvbjJuLXBvcnRmd2QuYw==) | `0.00% <0.00%> (ø)` | | | [src/edge\_utils\_win32.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2VkZ2VfdXRpbHNfd2luMzIuYw==) | | | | [src/edge\_utils.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2VkZ2VfdXRpbHMuYw==) | `1.81% <0.00%> (+0.01%)` | :arrow_up: | | [src/n2n.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL24ybi5j) | `1.15% <0.00%> (+0.19%)` | :arrow_up: | | [src/random\_numbers.c](https://codecov.io/gh/ntop/n2n/pull/1066/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3JhbmRvbV9udW1iZXJzLmM=) | `12.50% <0.00%> (+0.65%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

hamishcoleman commented 1 year ago

One of the CI tests has failed - are you able to run that test locally and confirm if you can reproduce the issue?

dwj0 commented 1 year ago

This is the exe file of the Windows version(git dev ec15ebb80c3a656d368adf4b1b25701b8758b4f1). Run supernode.bat and edge.bat, close edge, and then run edge.bat. At this time, "ERROR: authentication error, MAC or IP address already in use or not released yet by supernode" appears, And won't stop. Use supernode_repair.bat to reconnect after about a minute

Of course, if edge ends with ctrl+c, it is normal n2n.zip

dwj0 commented 1 year ago

In linux, use kill -9 to close edge, this problem will occur

Logan007 commented 1 year ago

Please do not use -9 to allow proper clean-up/sign-off at edge's end, see our FAQ for more details.