fix: a temporary solution for error reporting when enabling tun for devices that do not have an ipv6 environment.
This commit is contained in:
@@ -1289,6 +1289,10 @@ func parseTun(rawTun RawTun, general *General) error {
|
||||
}
|
||||
tunAddressPrefix = netip.PrefixFrom(tunAddressPrefix.Addr(), 30)
|
||||
|
||||
if !general.IPv6 || !verifyIP6() {
|
||||
rawTun.Inet6Address = nil
|
||||
}
|
||||
|
||||
general.Tun = Tun{
|
||||
Enable: rawTun.Enable,
|
||||
Device: rawTun.Device,
|
||||
|
||||
Reference in New Issue
Block a user