mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-09 10:49:35 +08:00
fix: TUN file exists
This commit is contained in:
parent
b0f7b9e4e0
commit
fb97733d55
@ -44,7 +44,7 @@ func ConfigInterfaceAddress(dev device.Device, addr netip.Prefix, forceMTU int,
|
||||
return err
|
||||
}
|
||||
|
||||
if err = netlink.AddrAdd(metaLink, naddr); err != nil {
|
||||
if err = netlink.AddrAdd(metaLink, naddr); err != nil && err.Error() != "file exists" {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ func ConfigInterfaceAddress(dev device.Device, addr netip.Prefix, forceMTU int,
|
||||
return err
|
||||
}
|
||||
|
||||
if err = netlink.AddrAdd(metaLink, naddr); err != nil {
|
||||
if err = netlink.AddrAdd(metaLink, naddr); err != nil && err.Error() != "file exists" {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ func ConfigInterfaceAddress(dev device.Device, addr netip.Prefix, forceMTU int,
|
||||
Protocol: 2,
|
||||
Src: ip.AsSlice(),
|
||||
Table: 254,
|
||||
}); err != nil {
|
||||
}); err != nil && err.Error() != "file exists" {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user