Skip to content

Commit

Permalink
Check for the right arp command for the platform
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaswth committed Jul 27, 2022
1 parent 75b7fb8 commit 1fb524e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion neighbors/arp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type (
)

func NewARP(count uint) (ARP, error) {
cmd, err := exec.LookPath("ip")
cmd, err := exec.LookPath(arpCmd)
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions neighbors/arp_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
)

const (
arpCmd = "arp"
arpOutputVersion = "1"
)

Expand Down
4 changes: 4 additions & 0 deletions neighbors/arp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import (
"goa.design/clue/log"
)

const (
arpCmd = "ip"
)

type (
arpEntry struct {
IPAddress string `json:"dst"`
Expand Down

0 comments on commit 1fb524e

Please sign in to comment.