tstest/natlab/vnet: explicitly ignore PCP and SSDP UDP queries

So we don't log about them when verbose logging is enabled.

Updates #13038

Change-Id: I925bc3a23e6c93d60dd4fb4bf6a4fdc5a326de95
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2024-08-23 11:43:12 -07:00 committed by Brad Fitzpatrick
parent 3b70968c25
commit 5a99940dfa

View File

@ -66,7 +66,12 @@
)
const nicID = 1
const stunPort = 3478
const (
stunPort = 3478
pcpPort = 5351
ssdpPort = 1900
)
func (s *Server) PopulateDERPMapIPs() error {
out, err := exec.Command("tailscale", "debug", "derp-map").Output()
@ -1115,6 +1120,13 @@ func (n *network) HandleEthernetIPv4PacketForRouter(ep EthernetPacket) {
return
}
if isUDP && (udp.DstPort == pcpPort || udp.DstPort == ssdpPort) {
// We handle NAT-PMP, but not these yet.
// TODO(bradfitz): handle? marginal utility so far.
// Don't log about them being unknown.
return
}
//log.Printf("Got packet: %v", packet)
}