mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Martian packets are dropped by default, but some setups require accepting them. A rate limited log will help users quickly hone in on the issue, which is otherwise unclear and time-consuming to debug. PiperOrigin-RevId: 693487838
80 lines
1.9 KiB
Python
80 lines
1.9 KiB
Python
load("//tools:defs.bzl", "go_library", "go_test")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "ipv4",
|
|
srcs = [
|
|
"icmp.go",
|
|
"igmp.go",
|
|
"ipv4.go",
|
|
"stats.go",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pkg/atomicbitops",
|
|
"//pkg/buffer",
|
|
"//pkg/log",
|
|
"//pkg/sync",
|
|
"//pkg/tcpip",
|
|
"//pkg/tcpip/checksum",
|
|
"//pkg/tcpip/header",
|
|
"//pkg/tcpip/header/parse",
|
|
"//pkg/tcpip/network/hash",
|
|
"//pkg/tcpip/network/internal/fragmentation",
|
|
"//pkg/tcpip/network/internal/ip",
|
|
"//pkg/tcpip/network/internal/multicast",
|
|
"//pkg/tcpip/stack",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "ipv4_test",
|
|
size = "small",
|
|
srcs = [
|
|
"igmp_test.go",
|
|
"ipv4_test.go",
|
|
"main_test.go",
|
|
],
|
|
deps = [
|
|
"//pkg/buffer",
|
|
"//pkg/refs",
|
|
"//pkg/sync",
|
|
"//pkg/tcpip",
|
|
"//pkg/tcpip/checker",
|
|
"//pkg/tcpip/checksum",
|
|
"//pkg/tcpip/faketime",
|
|
"//pkg/tcpip/header",
|
|
"//pkg/tcpip/link/channel",
|
|
"//pkg/tcpip/link/sniffer",
|
|
"//pkg/tcpip/network/arp",
|
|
"//pkg/tcpip/network/internal/testutil",
|
|
"//pkg/tcpip/network/ipv4",
|
|
"//pkg/tcpip/prependable",
|
|
"//pkg/tcpip/stack",
|
|
"//pkg/tcpip/testutil",
|
|
"//pkg/tcpip/transport/icmp",
|
|
"//pkg/tcpip/transport/raw",
|
|
"//pkg/tcpip/transport/tcp",
|
|
"//pkg/tcpip/transport/udp",
|
|
"//pkg/waiter",
|
|
"@com_github_google_go_cmp//cmp:go_default_library",
|
|
"@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "stats_test",
|
|
size = "small",
|
|
srcs = ["stats_test.go"],
|
|
library = ":ipv4",
|
|
deps = [
|
|
"//pkg/tcpip",
|
|
"//pkg/tcpip/stack",
|
|
"//pkg/tcpip/testutil",
|
|
],
|
|
)
|