google / google/gopacket

layers: support decoding DNS over TCP

Open
#236 4 comments 9 reactions 0 assignees View on GitHub
add protocol help wanted
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Gopacket seems to assume that DNS messages are always encapsulated on UDP, not supporting RFC5966

The following self-contained code fails to decode DNS requests over TCP: https://github.com/weaveworks/scope/blob/c5ac315b383fdf47c57cebb30bb2b7edd437ec74/probe/endpoint/dns_snooper_linux_amd64.go#L148

To reproduce:
1. Call `NewDNSSnooper()` to start decoding
2. Type `host -T www.google.com 8.8.8.8` on a shell
3. You will get errors like `DNSSnooper: error decoding packet: No decoder for layer type Payload`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.