Skip to content

Commit

Permalink
#10 skip VirtualBox network interfaces when searching about the local…
Browse files Browse the repository at this point in the history
… network ranges available
  • Loading branch information
mhewedy committed Aug 11, 2020
1 parent c03c5f9 commit 01a878a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ip/prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ func getIP() string {
strs := make([]string, 0)

for _, iface := range ifaces {

if strings.Contains(iface.Name, "VirtualBox") {
continue
}

addrs, err := iface.Addrs()
if err != nil {
fmt.Println(err)
Expand Down

0 comments on commit 01a878a

Please sign in to comment.