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
@@ -58,7 +58,7 @@ func NewDatagramMuxerV2(
|
||||
// demultiplex the payload from multiple datagram sessions
|
||||
func (dm *DatagramMuxerV2) SendToSession(session *packet.Session) error {
|
||||
if len(session.Payload) > dm.mtu() {
|
||||
// TODO: TUN-5302 return ICMP packet too big message
|
||||
packetTooBigDropped.Inc()
|
||||
return fmt.Errorf("origin UDP payload has %d bytes, which exceeds transport MTU %d", len(session.Payload), dm.mtu())
|
||||
}
|
||||
msgWithID, err := suffixSessionID(session.ID, session.Payload)
|
||||
|
Reference in New Issue
Block a user