rfratto / ckit-archive

WIP Cluster toolkit for consistent hashing distributed systems
Apache License 2.0
11 stars 1 forks source link

`DefaultInterfaces` for unix* are not default for Ubuntu #5

Open domasx2 opened 2 years ago

domasx2 commented 2 years ago

Yo!

DefaultInterfaces are hardcoded to try eth0 and en0 and advertised by comment for unix-like platforms, but these will never be found on Ubuntu and probably many other linux flavors that use predictable network interface names. Eg, ethernet is enp4s0f1 for me on Ubuntu 20.04 LTS. examining net.Interfaces() might be a better bet

rfratto commented 2 years ago

Hmm, I'll need to give this a bit of thought. I inherited the list from dskit, where the default list of interfaces is more of a hint than trying to be inclusive of all target platforms.