diff options
author | Arthur Sfez <asfez@google.com> | 2021-02-18 12:27:53 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-18 12:29:54 -0800 |
commit | 2a2cb29e1cc5c94299b79a3e561d7a6915158ae6 (patch) | |
tree | c87faf21bc50374099a54d82249aefe449998986 /pkg/tcpip/tcpip.go | |
parent | 26eada5dea1cce3e0911b1419d1257657378f494 (diff) |
Validate IGMP packets
This change also adds support for Router Alert option processing on
incoming packets, a new stat for Router Alert option, and exports
all the IP-option related stats.
Fixes #5491
PiperOrigin-RevId: 358238123
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index ba063dc26..01a4389e3 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -1581,11 +1581,16 @@ type IPStats struct { // the Output chain. IPTablesOutputDropped *StatCounter - // OptionTSReceived is the number of Timestamp options seen. - OptionTSReceived *StatCounter + // TODO(https://gvisor.dev/issues/5529): Move the IPv4-only option stats out + // of IPStats. + // OptionTimestampReceived is the number of Timestamp options seen. + OptionTimestampReceived *StatCounter - // OptionRRReceived is the number of Record Route options seen. - OptionRRReceived *StatCounter + // OptionRecordRouteReceived is the number of Record Route options seen. + OptionRecordRouteReceived *StatCounter + + // OptionRouterAlertReceived is the number of Router Alert options seen. + OptionRouterAlertReceived *StatCounter // OptionUnknownReceived is the number of unknown IP options seen. OptionUnknownReceived *StatCounter |