schollz / peerdiscovery

Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:
MIT License
644 stars 56 forks source link

Reintroduce Loopback Device Support #31

Closed oxzi closed 1 year ago

oxzi commented 2 years ago

The filterInterfaces function reduces the useable network interfaces for peer discovery. Due to two changes introduced in v1.6.4^0 and v1.6.5^1, a self-discovery over a loopback device was no longer possible.

For reasons, a device either holds the loopback flag or the multicast flag, not both together. This commit reflects this.

Furthermore, some refactoring of the filterInterfaces function was performed to ease its understandability.

schollz commented 1 year ago

Great! Sorry for the late reply