insomniacslk / dublin-traceroute

Dublin Traceroute is a NAT-aware multipath tracerouting tool
https://dublin-traceroute.net
BSD 2-Clause "Simplified" License
254 stars 57 forks source link

Fix bug in UDP packet matching in udpv6probe.go #126

Closed eKuohzZ closed 4 days ago

eKuohzZ commented 4 days ago

Fix bug in UDP packet matching in udpv6probe.go

In the Matches function of udpv6probe.go, the condition checking whether the InnerIPv6 payload length of rpu matches that of spu was incorrect. The condition should be changed from:

if pr.InnerIPv6().PayloadLen != len(p.Payload) + inet.UDPHeaderLen

to:

if pr.InnerIPv6().PayloadLen != len(p.Payload)

because p.Payload represents the length of the UDP packet, not the length of the UDP packet's payload.

Signed-off-by: ke zhou zhouk22@mails.tsinghua.edu.cn