fix tun config

This commit is contained in:
ginuerzh
2023-11-20 20:42:29 +08:00
parent e8be8d625a
commit 9be710dc19
5 changed files with 14 additions and 9 deletions

View File

@ -36,7 +36,7 @@ func (l *tunListener) createTun() (ifce io.ReadWriteCloser, name string, ip net.
ip = l.md.config.Net[0].IP
}
if err = l.addRoutes(name, l.md.config.Routes...); err != nil {
if err = l.addRoutes(name); err != nil {
return
}

View File

@ -36,7 +36,7 @@ func (l *tunListener) createTun() (ifce io.ReadWriteCloser, name string, ip net.
ip = l.md.config.Net[0].IP
}
if err = l.addRoutes(name, l.md.config.Routes...); err != nil {
if err = l.addRoutes(name); err != nil {
return
}

View File

@ -36,7 +36,7 @@ func (l *tunListener) createTun() (ifce io.ReadWriteCloser, name string, ip net.
ip = ipNet.IP
}
if err = l.addRoutes(name, l.md.config.Gateway, l.md.config.Routes...); err != nil {
if err = l.addRoutes(name, l.md.config.Gateway); err != nil {
return
}