1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-16 08:20:32 +08:00
This commit is contained in:
KOJIMA Takanori
2016-01-06 01:09:42 +00:00
parent e7338c341f
commit 4ae5e83fb9
2 changed files with 0 additions and 0 deletions

16
ipv4_linux_test.go Normal file
View File

@@ -0,0 +1,16 @@
package water
import (
"net"
"os/exec"
"testing"
)
func setupIfce(t *testing.T, ipNet net.IPNet, dev string) {
if err := exec.Command("ip", "link", "set", dev, "up").Run(); err != nil {
t.Fatal(err)
}
if err := exec.Command("ip", "addr", "add", ipNet.String(), "dev", dev).Run(); err != nil {
t.Fatal(err)
}
}