fix: fixed interface parsing on osx

This commit is contained in:
evilsocket 2018-01-13 14:31:03 +01:00
commit e0d9c14fc3

View file

@ -24,7 +24,7 @@ func FindInterface(name string) (*Endpoint, error) {
addrs, err := iface.Addrs() addrs, err := iface.Addrs()
// is interface active? // is interface active?
if err == nil && len(addrs) > 0 { if err == nil && len(addrs) > 0 {
if (name == "" && iface.Name != "lo") || iface.Name == name { if (name == "" && iface.Name != "lo" && iface.Name != "lo0") || iface.Name == name {
var e *Endpoint = nil var e *Endpoint = nil
// For every address of the interface. // For every address of the interface.
for _, addr := range addrs { for _, addr := range addrs {