mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 20:39:57 +00:00
TUN-6699: Add metric for packet too big dropped
This commit is contained in:

committed by
Igor Postelnik

parent
af6bf5c4e5
commit
e131125558
@@ -46,8 +46,7 @@ func (dm *DatagramMuxer) mtu() int {
|
||||
|
||||
func (dm *DatagramMuxer) SendToSession(session *packet.Session) error {
|
||||
if len(session.Payload) > dm.mtu() {
|
||||
// TODO: TUN-5302 return ICMP packet too big message
|
||||
// drop packet for now, eventually reply with ICMP for PMTUD
|
||||
packetTooBigDropped.Inc()
|
||||
return fmt.Errorf("origin UDP payload has %d bytes, which exceeds transport MTU %d", len(session.Payload), dm.mtu())
|
||||
}
|
||||
payloadWithMetadata, err := suffixSessionID(session.ID, session.Payload)
|
||||
|
Reference in New Issue
Block a user