Behavior of local discovery surprices me.

First, this may be working as designed. But I’m surprised. Please, enlighten me.

I have a Syncthing instance running on a computer with multiple Private IPv4 addresses on the same MAC.

Addresses are setup as 10.0.0.13/24 and 192.168.3.13/24. Syncthing is configured with ’Sync Protocol Listen Addresses’ tcp://192.168.3.13 ’Listen Addresses’ tcp://192.168.3.13 ’Local Announce Enabled’ (checked, so Yes) ‘Enable NAT traversal’ (Unchecked, so No) ‘Local Discovery’ (Checked, so Yes) ‘Global Discovery’ (Unchecked, No) ‘Enable Relaying’ (Unchecked, No).

My interpretation and expectation is that the Syncthing instance which is listening on 192.168.3.13 would do Local Discovery on 192.168.0.0/24 Class C, but to my surprise I see a lot of UDP packages from this computer to surrounding 10.0.0.0/24 computers on their ports 21027.

My reasoning (which may be totally off from Syncthing’s design) is that if I tell it to listen on 192.168.3.13, then it should do Local Discovery on the 192.168.0.0/24 (or maybe /16) only. But not on 10.0.0.0/anything.

Am I wrong in my reasoning? Or illogic?

Would appreciate if someone could tell me what I fail to understand, or alternatively confirm that Syncthing’s behaviour is unexpected.

Best regards GuS

Currently Syncthing broadcasts local discovery on all interfaces regardless of which interface the sync listen port happens to be bound to, and also subscribes to updates from all interfaces. I can see arguments both ways, but this is way it’s currently implemented.

(Now) Understood.

Could it potentially become a candidate for a future setting in the ‘Advanced’ section?

Regards

Guz

P.S BTW, thanks to all for your astonishing work on this product. I’m impressed.

P.P.S I still have problems trying to understand how to format text here. :slight_smile: GUIs. Hm.

1 Like

If the setting was just “try to limit local discovery to the same interface as the sync listen address, when it’s not the wildcard” I think that would be fine. But there are corner cases as the sync port binds to addresses, local discovery works with interfaces, there are multiple address families, addresses do not have a one to one mapping to interfaces, packets for an address can be accepted on another interface than the one having that address, and so on. All in all it feels complicated and limited value.

Before this is implemented if ever, you may filter out with firewall.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.