Skip to content

intra/tcp.go: don't create TCP endpoint before Dial() returns #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: n2
Choose a base branch
from

Conversation

Lanius-collaris
Copy link
Contributor

@ignoramous
I wonder if this change breaks anything.

@ignoramous
Copy link
Contributor

dnsOverride in L190 assumes a connected gconn.

On the diff, before return err, the egressing conn, pc, must be clos()d.

@Lanius-collaris Lanius-collaris marked this pull request as ready for review May 15, 2025 14:56
@Lanius-collaris
Copy link
Contributor Author

Why does firestack c646f0c close the TCP connection if the ANSWER SECTION of a DNS response is empty? ( e.g. dig +tcp github.com AAAA )

@ignoramous
Copy link
Contributor

ignoramous commented May 15, 2025

Why does firestack c646f0c close the TCP connection if the ANSWER SECTION of a DNS response is empty? ( e.g. dig +tcp github.com AAAA )

Strange. I'll take a look. Does it happen for all transport types in addition to DNS53 (DoH/ODoH, DoT, DNSCrypt)?

@Lanius-collaris
Copy link
Contributor Author

Lanius-collaris commented May 16, 2025

Why does firestack c646f0c close the TCP connection if the ANSWER SECTION of a DNS response is empty? ( e.g. dig +tcp github.com AAAA )

Strange. I'll take a look. Does it happen for all transport types in addition to DNS53 (DoH/ODoH, DoT, DNSCrypt)?

Log:

W transport.go:712: dns: fwd: Preferred is missing; using default
W goos.go:159: dns53: goosr: err(lookup github.com. on 192.168.122.1:53: no such host) / size(0)
E transport.go:847: async.go:58>>asm_amd64.s:1700>>???dns: tcp: for -1 err! tot: 1, t: 240ms, lookup github.com. on 192.168.122.1:53: no such host

Firestack called net.Resolver.LookupNetIP() instead of sending the original DNS query?

@ignoramous
Copy link
Contributor

Firestack called net.Resolver.LookupNetIP() instead of sending the original DNS query?

Default DNS isn't set (cf bootstrap.go) isn't set, and so it uses goos.go which simply delegates it to Go's built-in resolver (if in Loopback mode) or OS-preferred resolver (via libc, I imagine).

@Lanius-collaris
Copy link
Contributor Author

Firestack called net.Resolver.LookupNetIP() instead of sending the original DNS query?

Default DNS isn't set (cf bootstrap.go) isn't set, and so it uses goos.go which simply delegates it to Go's built-in resolver (if in Loopback mode) or OS-preferred resolver (via libc, I imagine).

Oh, I hardcoded TIDCSV "Preferred" in my small CLI but forgot to add a DNS transport with ID "Preferred".

@ignoramous
Copy link
Contributor

Oh, I hardcoded TIDCSV "Preferred" in my small CLI but forgot to add a DNS transport with ID "Preferred".

The firestack API isn't the greatest :(

@ignoramous
Copy link
Contributor

We have been bug bashing connectivity issues (mostly the DNS, retrier.go, and connpool.go, Proxy bits). We are almost done with the critical/big ones. I intend to merge this PR once we are done with it all.

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.

2 participants