summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/checker
diff options
context:
space:
mode:
authorJulian Elischer <jrelis@google.com>2020-08-14 02:05:23 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-14 02:07:36 -0700
commit190634e0fcf4cf25a449e1bd39533ca2ddad66e6 (patch)
tree9fcd438bcdf162d3e3c1bf7954b8a50baf1e7b2c /pkg/tcpip/checker
parentd6520e1d0592f99161faedef3eba49439b140917 (diff)
Give the ICMP Code its own type
This is a preparatory commit for a larger commit working on ICMP generation in error cases. This is removal of technical debt and cleanup in the gvisor code as part of gvisor issue 2211. Updates #2211. PiperOrigin-RevId: 326615389
Diffstat (limited to 'pkg/tcpip/checker')
-rw-r--r--pkg/tcpip/checker/checker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/checker/checker.go b/pkg/tcpip/checker/checker.go
index 1e5f5abf2..b769094dc 100644
--- a/pkg/tcpip/checker/checker.go
+++ b/pkg/tcpip/checker/checker.go
@@ -699,7 +699,7 @@ func ICMPv4Type(want header.ICMPv4Type) TransportChecker {
}
// ICMPv4Code creates a checker that checks the ICMPv4 Code field.
-func ICMPv4Code(want byte) TransportChecker {
+func ICMPv4Code(want header.ICMPv4Code) TransportChecker {
return func(t *testing.T, h header.Transport) {
t.Helper()
@@ -757,7 +757,7 @@ func ICMPv6Type(want header.ICMPv6Type) TransportChecker {
}
// ICMPv6Code creates a checker that checks the ICMPv6 Code field.
-func ICMPv6Code(want byte) TransportChecker {
+func ICMPv6Code(want header.ICMPv6Code) TransportChecker {
return func(t *testing.T, h header.Transport) {
t.Helper()