为什么这个 DNS 的 QNAME 没有 q。以 NULL 字符结尾?

Why doesn't the QNAME for this DNS q. end with a NULL character?

我在使用 WireShark 监控端口 5353 (mDNS) 时遇到了以下 DNS 问题:

根据 RFC 1035 的第 4.1.2 节,QNAME 是:

a domain name represented as a sequence of labels, where each label consists of a length octet followed by that number of octets. The domain name terminates with the zero length octet for the null label of the root...

这似乎与我在上面的捕获中通过网络看到的内容相矛盾。最后一个标签以 c0 12 而不是 00 结尾。为什么会这样,为什么 RFC 中没有记录它?

显然,当一个标签序列以c0 12结束时,这表示一个间接指针。它大致相当于声明 "go to this offset in the DNS query and continue reading from there".

前两位是常量 (c0),其余 14 位是从查询开始的偏移量。例如,在我的问题中,c0 12 表示 QNAME 的下一部分应该来自查询中的 47 个字节。

05 6c 6f 63 61 6c 00    .local.