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 and Syncthing is configured with ’Sync Protocol Listen Addresses’ tcp:// ’Listen Addresses’ tcp:// ’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 would do Local Discovery on Class C, but to my surprise I see a lot of UDP packages from this computer to surrounding 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, then it should do Local Discovery on the (or maybe /16) only. But not on

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?



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.