summaryrefslogtreecommitdiffhomepage
path: root/net/packet
diff options
context:
space:
mode:
authorsalman <salman@tailscale.com>2023-06-27 18:26:32 +0000
committersalman <salman@tailscale.com>2023-07-27 12:35:23 +0000
commit737a21f07821a9fe0b522ac4ac77109a164a5e64 (patch)
treefb77bb6c331b3a5dba3fe0f2f624dd79e2765624 /net/packet
parent49f24034eaf4d0f779b0f0e0673b77a794b1a3c3 (diff)
downloadtailscale-s/pmtud.tar.xz
tailscale-s/pmtud.zip
WIP wgengine: inject ICMP PTB for oversize packetss/pmtud
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/icmp4.go3
-rw-r--r--net/packet/icmp6.go1
2 files changed, 3 insertions, 1 deletions
diff --git a/net/packet/icmp4.go b/net/packet/icmp4.go
index 730239abf..9375aebd6 100644
--- a/net/packet/icmp4.go
+++ b/net/packet/icmp4.go
@@ -45,7 +45,8 @@ func (t ICMP4Type) String() string {
type ICMP4Code uint8
const (
- ICMP4NoCode ICMP4Code = 0
+ ICMP4NoCode ICMP4Code = 0x00
+ ICMP4FragmentationNeeded = 0x04
)
// ICMP4Header is an IPv4+ICMPv4 header.
diff --git a/net/packet/icmp6.go b/net/packet/icmp6.go
index 518746b55..d74667c6d 100644
--- a/net/packet/icmp6.go
+++ b/net/packet/icmp6.go
@@ -20,6 +20,7 @@ type ICMP6Type uint8
const (
ICMP6Unreachable ICMP6Type = 1
+ ICMP6PacketTooBig ICMP6Type = 2
ICMP6TimeExceeded ICMP6Type = 3
ICMP6EchoRequest ICMP6Type = 128
ICMP6EchoReply ICMP6Type = 129