Simplify hasGateway check

This commit is contained in:
Davide De Rosa 2022-10-27 00:23:12 +02:00
parent 7b6aca479b
commit 5913b801a9
1 changed files with 2 additions and 2 deletions

View File

@ -172,10 +172,10 @@ extension NetworkSettingsBuilder {
var hasGateway: Bool {
var hasGateway = false
if isIPv4Gateway && computedIPv4Settings != nil {
if isIPv4Gateway && remoteOptions.ipv4 != nil {
hasGateway = true
}
if isIPv6Gateway && computedIPv6Settings != nil {
if isIPv6Gateway && remoteOptions.ipv6 != nil {
hasGateway = true
}
return hasGateway