修复bug

This commit is contained in:
黄思敏 2022-08-25 10:25:20 +08:00
parent f8d4727c2b
commit c6f340a5ae

2
tap.go
View File

@ -70,7 +70,7 @@ func (nc *NetCard) Run() {
go nc.runWrite() go nc.runWrite()
// go nc.cli.run() // go nc.cli.run()
time.Sleep(time.Second) time.Sleep(time.Second)
cmd := strings.Split("addr add 10.10.10.10/24 dev stap", " ") cmd := strings.Split("ip addr add 10.10.10.10/24 dev stap", " ")
err := exec.Command(cmd[0], cmd[1:]...).Run() err := exec.Command(cmd[0], cmd[1:]...).Run()
if err != nil { if err != nil {
panic(err) panic(err)