tinc icon indicating copy to clipboard operation
tinc copied to clipboard

tinc purge not working when autoconnect is enabled

Open l-rossetti opened this issue 3 years ago • 1 comments

I'm running tinc-1.1-pre18 to make some sort of overlay network.

I've discovered a weird behavior related to AutoConnect = yes variable: when the variable is enabled I cannot purge old (non-reachable) clients from tinc top. The current behavior makes things a little bit dirty and difficult to debug.

Following is the tinc top output in the case the variable is enabled or disabled:

AutoConnect = yes

Node                IN pkts   IN bytes   OUT pkts  OUT bytes
host_2_56bf75b978_gzwnv         0          0          0          0
host_2_56bf75b978_nrvd2          0          0          0          0
host_2_56bf75b978_qrksc           0          0          0          0
host_2_56bf75b978_xg5bk          0          0          0          0
host_2_56bf75b978_xkl92           0          0          0          0
host_2_69b76bc67_7zj6x             0          0          0          0
host_2_69b76bc67_zx46f            0          0          0          0
server                                              0          0          0          0

Then if I disable autoconnect and then run tinc purge I get the following which is what I expect: AutoConnect = no

Node                    IN pkts   IN bytes   OUT pkts  OUT bytes
host_2_56bf75b978_gzwnv          0          0          0          0
host_2_56bf75b978_nrvd2          0          0          0          0
host_2_56bf75b978_xkl92          0          0          0          0
server                          0          0          0          0

Is it possible to purge the non-reachable nodes with autoconnect?

l-rossetti avatar Nov 08 '21 14:11 l-rossetti

The autoconnect algorithm normally needs to remember all the nodes, even the unreachable ones, in order to keep trying to get all of the mesh connected properly. However, perhaps you would be fine with having a reachable modifier for the top command, just like for dump nodes? That way you could do:

tinc top reachable

And only see traffic of reachable nodes?

gsliepen avatar Apr 01 '22 12:04 gsliepen