Skip to content

Remove redundant process bind + fix tautological dns: test assertion - #48

Merged
sfloess merged 1 commit into
mainfrom
fix/redundant-bind-and-dns-test
Jul 21, 2026
Merged

Remove redundant process bind + fix tautological dns: test assertion#48
sfloess merged 1 commit into
mainfrom
fix/redundant-bind-and-dns-test

Conversation

@sfloess

@sfloess sfloess commented Jul 21, 2026

Copy link
Copy Markdown
Member

Follow-up cleanup after the two [Grok] commits (5f298ca, d3b2fdd):

  1. TunnelService.ktconnect() had a duplicate bindProcessToNetwork() call left over after the early bind was added in connectWifi(). The early bind (before MTU detection) is the one that matters; this removes the redundant post-establish() bind and its stale log tag, keeping only setUnderlyingNetworks() there since that still needs to run post-establish for the VPN network association.

  2. SocksTunnelTest.kt — the new buildConfig contains dns block for DNS resolution test asserted config.contains("address: ${$}{SocksTunnel.DNS_ADDRESS}"), i.e. checking for 198.18.0.2 — the mapdns constant, not the dns: block's actual address (socksHost). It passed coincidentally because that string already appears elsewhere in the config. Now uses a host distinct from DNS_ADDRESS so the assertion can only pass if the dns: block is actually correct.

- TunnelService.connect() no longer duplicates bindProcessToNetwork():
  it now happens once, early in connectWifi(), before MTU detection
  runs (so probes actually reach the SOCKS host). The post-establish()
  call was fully redundant and left inconsistent log tags behind.
- SocksTunnelTest's dns: block test previously asserted against
  DNS_ADDRESS (198.18.0.2, the unrelated mapdns constant) instead of
  the dns: block's actual value (socksHost). It passed for the wrong
  reason. Now uses a host distinct from DNS_ADDRESS so the assertion
  can only pass if the dns: block's address is actually correct.
@sonarqubecloud

Copy link
Copy Markdown

@sfloess
sfloess merged commit a682d67 into main Jul 21, 2026
3 checks passed
@sfloess
sfloess deleted the fix/redundant-bind-and-dns-test branch July 21, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant