Fix linux unset route

This commit is contained in:
世界 2022-07-20 13:14:54 +08:00
parent f53aabff27
commit d35c334b46
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -74,6 +74,7 @@ func (t *NativeTun) configure(tunLink netlink.Link) error {
}
if t.autoRoute {
_ = t.unsetRoute0(tunLink)
err = t.setRoute(tunLink)
if err != nil {
_ = t.unsetRoute0(tunLink)