chore: netlink duplicate contains

This commit is contained in:
adlyq
2022-11-02 23:58:51 +08:00
parent 22fb219ad8
commit 7b0cd14b00
7 changed files with 12 additions and 18 deletions

View File

@ -337,7 +337,10 @@ func ReCreateMixed(port int, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.P
func ReCreateTun(tunConf *config.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter) {
tunMux.Lock()
defer tunMux.Unlock()
defer func() {
lastTunConf = tunConf
tunMux.Unlock()
}()
var err error
defer func() {
@ -361,8 +364,6 @@ func ReCreateTun(tunConf *config.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- *
}
tunLister, err = sing_tun.New(*tunConf, tcpIn, udpIn)
lastTunConf = tunConf
}
func ReCreateRedirToTun(ifaceNames []string) {