summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-10 18:28:30 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-10 18:28:30 +0000
commit500928d53a3078c1417570c0e5f328cad7333d37 (patch)
tree277a1a1fe1ed73439b13ab8628561f934ebdd25e /pkg/tcpip/link
parentf5c6e5c747bdf805a69c8d93ced3fdb58f1dfb91 (diff)
parentf004bb8703b516a423e05111e8d0fc55b1a850d8 (diff)
Merge release-20200522.0-115-gf004bb870 (automated)
Diffstat (limited to 'pkg/tcpip/link')
-rw-r--r--pkg/tcpip/link/sniffer/sniffer.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/pkg/tcpip/link/sniffer/sniffer.go b/pkg/tcpip/link/sniffer/sniffer.go
index 04982110a..f2e47b6a7 100644
--- a/pkg/tcpip/link/sniffer/sniffer.go
+++ b/pkg/tcpip/link/sniffer/sniffer.go
@@ -47,13 +47,6 @@ var LogPackets uint32 = 1
// LogPacketsToPCAP must be accessed atomically.
var LogPacketsToPCAP uint32 = 1
-var transportProtocolMinSizes map[tcpip.TransportProtocolNumber]int = map[tcpip.TransportProtocolNumber]int{
- header.ICMPv4ProtocolNumber: header.IPv4MinimumSize,
- header.ICMPv6ProtocolNumber: header.IPv6MinimumSize,
- header.UDPProtocolNumber: header.UDPMinimumSize,
- header.TCPProtocolNumber: header.TCPMinimumSize,
-}
-
type endpoint struct {
dispatcher stack.NetworkDispatcher
lower stack.LinkEndpoint
@@ -299,13 +292,6 @@ func logPacket(prefix string, protocol tcpip.NetworkProtocolNumber, pkt *stack.P
return
}
- // We aren't guaranteed to have a transport header - it's possible for
- // writes via raw endpoints to contain only network headers.
- if minSize, ok := transportProtocolMinSizes[tcpip.TransportProtocolNumber(transProto)]; ok && vv.Size() < minSize {
- log.Infof("%s %v -> %v transport protocol: %d, but no transport header found (possible raw packet)", prefix, src, dst, transProto)
- return
- }
-
// Figure out the transport layer info.
transName := "unknown"
srcPort := uint16(0)