• Joined on 2025年08月11日
Kentzo opened issue miekg/dns#678 2026年02月02日 19:30:08 +01:00
Msg: why drain socket after receiving gibberish?
Kentzo commented on issue miekg/dns#645 2026年01月29日 21:49:55 +01:00
Documentation suggestions

[2] at least with CoreDNS, while it's not spelled out, my understanding is that:

Kentzo commented on issue miekg/dns#645 2026年01月29日 20:39:39 +01:00
Documentation suggestions

If I may chime in, I'd like to see documentation to spell out how to reuse dns.Msg:

Kentzo commented on issue miekg/dns#284 2025年11月11日 16:38:15 +01:00
Discussion: DSO in DNSv2

I think the choice of moving session stuff elsewhere was the right one. Imo validation and Is* functions should also be moved out.

Kentzo opened issue miekg/dns#284 2025年10月08日 01:53:00 +02:00
Discussion: DSO in DNSv2
Kentzo commented on issue miekg/dns#279 2025年10月07日 14:58:44 +02:00
DSO: some messages should not be processed in parallel

Order of the TCP messages is broken here:

b07b0629b3/server.go (L354-L358)

If SUBSCRIBE and UNSUBSCRIBE arrive (in that...

Kentzo opened issue miekg/dns#279 2025年10月07日 13:58:27 +02:00
DSO: some messages should not be processed in parallel
Kentzo commented on issue miekg/dns#152 2025年10月02日 10:52:05 +02:00
Server: Notify handler when TCP connection is not longer serviceable

serveTCP's read blocks, for the specified timeout, all other reads including zero-length: 2c08268ee9/server.go (L342-L345) ...

Kentzo commented on issue miekg/dns#152 2025年09月19日 20:52:08 +02:00
Server: Notify handler when TCP connection is not longer serviceable

Asked whether zero-reads are disallowed for the case above in the #crypto channel of Gopher's slack. Heres the answer I got from...

Kentzo commented on issue miekg/dns#152 2025年09月19日 03:42:39 +02:00
Server: Notify handler when TCP connection is not longer serviceable

At least on Darwin the following workaround (?) seems to work:

- i, err = conn.Read(make([]byte, 0))
+ i, err = conn.NetConn().Read(make([]byte, 0))

But the doc for tls.Conn.Ne...

Kentzo commented on issue miekg/dns#152 2025年09月18日 17:14:35 +02:00
Server: Notify handler when TCP connection is not longer serviceable

One can do it if they do the non-zero reading.

I’m all for it and I don’t mind polling. But it needs to be portable and, for my use case, work with both tls.Conn and net.TCPConn.

I’ll...

Kentzo commented on issue miekg/dns#152 2025年09月17日 20:42:53 +02:00
Server: Notify handler when TCP connection is not longer serviceable

Quick test against CoreDNS's tls server:

package main
import (
	"crypto/tls"
	"fmt"
)
func main() {
	conn, err := tls.Dial("tcp", "127.0.0.1:8853", &tls.Config{
		InsecureSkipVer...
Kentzo commented on issue miekg/dns#152 2025年09月17日 20:26:41 +02:00
Server: Notify handler when TCP connection is not longer serviceable

Alas, this won't work for tls.Conn:

func(c*Conn)Read(b[]byte)(int,error){iferr:=c.Handshake();...
Kentzo commented on issue miekg/dns#152 2025年09月17日 08:08:05 +02:00
Server: Notify handler when TCP connection is not longer serviceable

Meanwhile i'm pushing simplications in #192

Perhaps `hijacked = hijacked

Kentzo commented on issue miekg/dns#152 2025年09月17日 08:04:28 +02:00
Server: Notify handler when TCP connection is not longer serviceable

Think a zero byte read should fail in that case - haven't tried it.

https://github.com/golang/go/issues/10940, in particular the last comment. The current doc for [https://pkg.go.dev/io#Reader...

Kentzo commented on pull request miekg/dns#190 2025年09月16日 21:05:54 +02:00
responsewriter hijack fixes

This test passed before because wg.Add(1) was not called until a valid message was seen. Now wg.Add(1) is called at the very beginning and wg.Done(1) is not called until the reading loop is...

Kentzo commented on pull request miekg/dns#190 2025年09月16日 19:12:17 +02:00
responsewriter hijack fixes

The test is stuck reading from the socket. SetReadDeadline doesn't seem to be set to unblock read on shutdown.

Kentzo commented on issue miekg/dns#152 2025年09月16日 08:55:38 +02:00
Server: Notify handler when TCP connection is not longer serviceable

I mean if you hijack it would be nice to learn the listener for this tcp conn went away

Did the last diff capture what you referred to here, or was it something else?

Kentzo commented on issue miekg/dns#152 2025年09月15日 21:55:46 +02:00
Server: Notify handler when TCP connection is not longer serviceable

Maybe it's better for Hijack to return error?