summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/header/icmpv4.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-02-01 20:21:37 +0000
committergVisor bot <gvisor-bot@google.com>2021-02-01 20:21:37 +0000
commite82d147017378b3114f1394df47242e27daeb5fd (patch)
treeb1591daa96e70aceb285f014125ad5eceede13e9 /pkg/tcpip/header/icmpv4.go
parente04f4bfef606ec8297223456eaa80fc1ee9d780e (diff)
parentebd3912c0f7e4255f100a00d2ab27304dac70daa (diff)
Merge release-20210125.0-47-gebd3912c0 (automated)
Diffstat (limited to 'pkg/tcpip/header/icmpv4.go')
-rw-r--r--pkg/tcpip/header/icmpv4.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/pkg/tcpip/header/icmpv4.go b/pkg/tcpip/header/icmpv4.go
index 5f9b8e9e2..f840a4322 100644
--- a/pkg/tcpip/header/icmpv4.go
+++ b/pkg/tcpip/header/icmpv4.go
@@ -16,7 +16,6 @@ package header
import (
"encoding/binary"
- "fmt"
"gvisor.dev/gvisor/pkg/tcpip"
"gvisor.dev/gvisor/pkg/tcpip/buffer"
@@ -208,16 +207,3 @@ func ICMPv4Checksum(h ICMPv4, vv buffer.VectorisedView) uint16 {
return ^xsum
}
-
-// ICMPOriginFromNetProto returns the appropriate SockErrOrigin to use when
-// a packet having a `net` header causing an ICMP error.
-func ICMPOriginFromNetProto(net tcpip.NetworkProtocolNumber) tcpip.SockErrOrigin {
- switch net {
- case IPv4ProtocolNumber:
- return tcpip.SockExtErrorOriginICMP
- case IPv6ProtocolNumber:
- return tcpip.SockExtErrorOriginICMP6
- default:
- panic(fmt.Sprintf("unsupported net proto to extract ICMP error origin: %d", net))
- }
-}