Skip to content

Commit

Permalink
fix bug of getting online clients
Browse files Browse the repository at this point in the history
  • Loading branch information
lonord committed Sep 10, 2018
1 parent 69f9a8b commit 2502bb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION=1.2
VERSION=1.3

cd $(dirname $0)

Expand Down
2 changes: 1 addition & 1 deletion client/clientutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ClientInfo struct {
}

func ReadClients(execFn ba.CmdExecutorFn, cfg *ba.Config) ([]ClientInfo, error) {
output, err := execFn(fmt.Sprintf("arp -a -i %s", cfg.BridgeName))
output, err := execFn(fmt.Sprintf("arp -a -H ether -i %s", cfg.BridgeName))
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions client/clientutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
func TestReadClients(t *testing.T) {
cfg := &ba.Config{
BridgeName: "br-lan",
BridgeAddr: "192.168.4.1",
}
clients, err := ReadClients(func(s string) (string, error) {
return arpResult, nil
Expand Down

0 comments on commit 2502bb8

Please sign in to comment.