mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-27 03:32:03 +00:00
wgengine/filter: fix IPv4 IGMP spam omission, also omit ff02::16 spam
And add tests. Fixes #618 Updates #402
This commit is contained in:
@@ -57,7 +57,7 @@ type NextHeader uint8
|
||||
|
||||
func (p *ParsedPacket) String() string {
|
||||
if p.IPVersion == 6 {
|
||||
return "IPv6{???}"
|
||||
return fmt.Sprintf("IPv6{Proto=%d}", p.IPProto)
|
||||
}
|
||||
switch p.IPProto {
|
||||
case Unknown:
|
||||
|
||||
@@ -200,7 +200,7 @@ func TestParsedPacket(t *testing.T) {
|
||||
{"tcp", tcpPacketDecode, "TCP{1.2.3.4:123 > 5.6.7.8:567}"},
|
||||
{"icmp", icmpRequestDecode, "ICMP{1.2.3.4:0 > 5.6.7.8:0}"},
|
||||
{"unknown", unknownPacketDecode, "Unknown{???}"},
|
||||
{"ipv6", ipv6PacketDecode, "IPv6{???}"},
|
||||
{"ipv6", ipv6PacketDecode, "IPv6{Proto=58}"},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user