You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: interfaces of type "dummy" (like a loopback, but usually not given an address in the 127.x space) are not supported(?) by the GetInterfaceIP template function
Grab the binary to play around:
root@ip-172-25-26-131:~/go/bin# go get -u github.com/hashicorp/go-sockaddr/cmd/sockaddr
List all the network interfaces on the host:
root@ip-172-25-26-131:~/go/bin# ip -o link show | awk -F': ' '{print $2}'
lo
ens5
dummy0
docker0
Basically: It appears that the GetInterfaceIP is not well named. That is, the GetInterfaceIP function should have been named GetForwardableInterfaceIP or similar. I can understand why adjusting the existing function name may not be ideal and would suggest an alternative:
keep the GetInterfaceIP function, but add documentation indicated the limitations w/r/t the filtered address ranges
create a new GetInterfaceIPRegardlessOfInterrfaceFlags function which will omit the check against ForwardingBlacklist.
update the documentation describing the limits in GetInterfaceIP to indicate that there's an alternative function, GetInterfaceIPRegardlessOfInterrfaceFlags that may be better suited to the users purposes.
A
pictureconsole log is worth 1000 words:TL;DR: interfaces of type "dummy" (like a loopback, but usually not given an address in the 127.x space) are not supported(?) by the
GetInterfaceIP
template functiona
Nil
result was not expected.dummy
interface came into existence:Additional info that may be helpful:
For context, this issue was discovered while troubleshooting this specific configuration of consul:
hashicorp/consul#5371
The text was updated successfully, but these errors were encountered: