fix: compile
This commit is contained in:
@ -4,9 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/Dreamacro/clash/listener/inner"
|
||||
"github.com/Dreamacro/clash/listener/tun/ipstack/commons"
|
||||
"github.com/vishvananda/netlink"
|
||||
"net"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"sync"
|
||||
@ -456,16 +454,7 @@ func Cleanup(wait bool) {
|
||||
commons.WaitForTunClose(lastTunConf.Device)
|
||||
}
|
||||
|
||||
if runtime.GOOS == "android" {
|
||||
r := netlink.NewRule()
|
||||
for i := 0; i < 5; i++ {
|
||||
r.Priority = 9000 + i*10
|
||||
err := netlink.RuleDel(r)
|
||||
if err != nil {
|
||||
log.Warnln("[TOUTE] cleanup route rule: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
commons.CleanupRule()
|
||||
}
|
||||
tunStackListener = nil
|
||||
lastTunConf = nil
|
||||
|
Reference in New Issue
Block a user