wgengine/packet: rename types to reflect their v4-only-ness, document.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2020-11-09 15:34:03 -08:00
parent ebd96bf4a9
commit 19df6a2ee2
12 changed files with 196 additions and 181 deletions

View File

@@ -77,8 +77,8 @@ const (
)
type tuple struct {
SrcIP packet.IP
DstIP packet.IP
SrcIP packet.IP4
DstIP packet.IP4
SrcPort uint16
DstPort uint16
}
@@ -412,7 +412,7 @@ func omitDropLogging(p *packet.ParsedPacket, dir direction) bool {
// it doesn't know about, so parse it out ourselves if needed.
ipProto := p.IPProto
if ipProto == 0 && len(b) > 8 {
ipProto = packet.IPProto(b[9])
ipProto = packet.IP4Proto(b[9])
}
// Omit logging about outgoing IGMP.
if ipProto == packet.IGMP {