diff --git a/config_test.go b/config_test.go index 155fa44..d33a83e 100644 --- a/config_test.go +++ b/config_test.go @@ -14,6 +14,7 @@ func TestConfig(t *testing.T) { if err != nil { log.Panic(err) } + dec := yaml.NewDecoder(f) err = dec.Decode(cnf) if err != nil { @@ -21,3 +22,7 @@ func TestConfig(t *testing.T) { } t.Error(cnf) } + +func TestCase1(t *testing.T) { + +} diff --git a/main.go b/main.go index d722992..bef35ea 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ func testmain() { var a chan bool = make(chan bool) go func() { <-a - cmdstr := fmt.Sprintf("ip addr add %s dev stun", config.Network.Self.Virt) + cmdstr := fmt.Sprintf("ip addr add %s dev stun", "10.10.10.111") log.Println(cmdstr) cmd := strings.Split(cmdstr, " ") err := exec.Command(cmd[0], cmd[1:]...).Run() @@ -64,5 +64,7 @@ func testmain() { log.Printf("Src: %s %s\n", waterutil.IPv4Source(frame), frame.Source()) log.Printf("Ethertype: % x\n", frame.Ethertype()) // log.Printf("Payload: % x\n", frame.Payload()) + + ifce.Write(frame) } }