diff --git a/.gitignore b/.gitignore index 4482273..4879299 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ .DS_Store config.yaml +WireGold diff --git a/gold/link/me.go b/gold/link/me.go index 8aef9f2..b64acb6 100644 --- a/gold/link/me.go +++ b/gold/link/me.go @@ -155,7 +155,7 @@ func (p PacketID) issame(packet []byte) bool { func (m *Me) sendAllSameDst(packet []byte) (n int, rem []byte) { rem = packet if !waterutil.IsIPv4(packet) { - for waterutil.IsIPv6(rem) { + for len(rem) > 20 && waterutil.IsIPv6(rem) { pktl := int(binary.BigEndian.Uint16(packet[4:6])) + 40 if pktl > len(rem) { return