@@ -3001,7 +3001,7 @@ class BraveVPNService :
30013001 }
30023002
30033003 if (trapVpnDns) {
3004- logd(" flow: dns-request, returning Ipn .Base, $uid " )
3004+ logd(" flow: dns-request, returning ${ Backend .Base } , $uid , $connId " )
30053005 return @runBlocking persistAndConstructFlowResponse(null , Backend .Base , connId, uid)
30063006 }
30073007
@@ -3049,22 +3049,22 @@ class BraveVPNService :
30493049 val proxyId = " ${ProxyManager .ID_WG_BASE }${wgConfig.id} "
30503050 // even if inactive, route connections to wg if lockdown/catch-all is enabled to
30513051 // avoid leaks
3052- return if (wgConfig.isActive || wgConfig.isLockdown || wgConfig.isCatchAll) {
3052+ if (wgConfig.isActive || wgConfig.isLockdown || wgConfig.isCatchAll) {
30533053 val canRoute = vpnAdapter?.canRouteIp(proxyId, connTracker.destIP, true )
30543054 if (canRoute == true ) {
30553055 logd(" flow: wg is active/lockdown/catch-all; $proxyId , $connId , $uid " )
3056- persistAndConstructFlowResponse(connTracker, proxyId, connId, uid)
3056+ return persistAndConstructFlowResponse(connTracker, proxyId, connId, uid)
30573057 } else {
30583058 logd(" flow: wg is active/lockdown/catch-all, but no route, $connId , $uid " )
3059- persistAndConstructFlowResponse(connTracker, Backend .Base , connId, uid)
3059+ return persistAndConstructFlowResponse(connTracker, Backend .Base , connId, uid)
30603060 }
30613061 } else {
3062- logd(" flow: wg is not active; using base, $connId , $uid " )
3063- persistAndConstructFlowResponse(connTracker, Backend .Base , connId, uid)
3062+ // fall-through, no lockdown/catch-all/active wg found, so proceed with other checks
30643063 }
30653064 }
30663065
30673066 // no need to check for other proxies if the protocol is not TCP or UDP
3067+ // fixme: is this even needed?
30683068 if (
30693069 connTracker.protocol != Protocol .TCP .protocolType &&
30703070 connTracker.protocol != Protocol .UDP .protocolType
0 commit comments