mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Implement UDP cheksum verification.
Test: - TestIncrementChecksumErrors Fixes #2943 PiperOrigin-RevId: 317348158
This commit is contained in:
@@ -191,6 +191,7 @@ var Metrics = tcpip.Stats{
|
||||
MalformedPacketsReceived: mustCreateMetric("/netstack/udp/malformed_packets_received", "Number of incoming UDP datagrams dropped due to the UDP header being in a malformed state."),
|
||||
PacketsSent: mustCreateMetric("/netstack/udp/packets_sent", "Number of UDP datagrams sent."),
|
||||
PacketSendErrors: mustCreateMetric("/netstack/udp/packet_send_errors", "Number of UDP datagrams failed to be sent."),
|
||||
ChecksumErrors: mustCreateMetric("/netstack/udp/checksum_errors", "Number of UDP datagrams dropped due to bad checksums."),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ func (s *Stack) Statistics(stat interface{}, arg string) error {
|
||||
udp.PacketsSent.Value(), // OutDatagrams.
|
||||
udp.ReceiveBufferErrors.Value(), // RcvbufErrors.
|
||||
0, // Udp/SndbufErrors.
|
||||
0, // Udp/InCsumErrors.
|
||||
udp.ChecksumErrors.Value(), // Udp/InCsumErrors.
|
||||
0, // Udp/IgnoredMulti.
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user