summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/BUILD
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-08-28 14:37:53 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-28 14:39:30 -0700
commitd5787f628c40624db4d9d2a970f7e672bb006852 (patch)
tree5b01df98d9e821b527b459e7e47472510a5eb361 /test/syscalls/linux/BUILD
parentb4820e598681c61fbf0e8a7f4d3436d2599ce53c (diff)
Don't bind loopback to all IPs in an IPv6 subnet
An earlier change considered the loopback bound to all addresses in an assigned subnet. This should have only be done for IPv4 to maintain compatability with Linux: ``` $ ip addr show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group ... link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever $ ping 2001:db8::1 PING 2001:db8::1(2001:db8::1) 56 data bytes ^C --- 2001:db8::1 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3062ms $ ping 2001:db8::2 PING 2001:db8::2(2001:db8::2) 56 data bytes ^C --- 2001:db8::2 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2030ms $ sudo ip addr add 2001:db8::1/64 dev lo $ ping 2001:db8::1 PING 2001:db8::1(2001:db8::1) 56 data bytes 64 bytes from 2001:db8::1: icmp_seq=1 ttl=64 time=0.055 ms 64 bytes from 2001:db8::1: icmp_seq=2 ttl=64 time=0.074 ms 64 bytes from 2001:db8::1: icmp_seq=3 ttl=64 time=0.073 ms 64 bytes from 2001:db8::1: icmp_seq=4 ttl=64 time=0.071 ms ^C --- 2001:db8::1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3075ms rtt min/avg/max/mdev = 0.055/0.068/0.074/0.007 ms $ ping 2001:db8::2 PING 2001:db8::2(2001:db8::2) 56 data bytes From 2001:db8::1 icmp_seq=1 Destination unreachable: No route From 2001:db8::1 icmp_seq=2 Destination unreachable: No route From 2001:db8::1 icmp_seq=3 Destination unreachable: No route From 2001:db8::1 icmp_seq=4 Destination unreachable: No route ^C --- 2001:db8::2 ping statistics --- 4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3070ms ``` Test: integration_test.TestLoopbackAcceptAllInSubnet PiperOrigin-RevId: 329011566
Diffstat (limited to 'test/syscalls/linux/BUILD')
-rw-r--r--test/syscalls/linux/BUILD19
1 files changed, 2 insertions, 17 deletions
diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD
index 5a323d331..fad3be7bf 100644
--- a/test/syscalls/linux/BUILD
+++ b/test/syscalls/linux/BUILD
@@ -2417,21 +2417,6 @@ cc_library(
)
cc_library(
- name = "socket_ip_udp_unbound_netlink_test_utils",
- testonly = 1,
- srcs = [
- "socket_ip_udp_unbound_netlink_util.cc",
- ],
- hdrs = [
- "socket_ip_udp_unbound_netlink_util.h",
- ],
- deps = [
- ":socket_test_util",
- ],
- alwayslink = 1,
-)
-
-cc_library(
name = "socket_ipv4_udp_unbound_netlink_test_cases",
testonly = 1,
srcs = [
@@ -2441,8 +2426,8 @@ cc_library(
"socket_ipv4_udp_unbound_netlink.h",
],
deps = [
- ":socket_ip_udp_unbound_netlink_test_utils",
":socket_netlink_route_util",
+ ":socket_test_util",
"//test/util:capability_util",
gtest,
],
@@ -2459,8 +2444,8 @@ cc_library(
"socket_ipv6_udp_unbound_netlink.h",
],
deps = [
- ":socket_ip_udp_unbound_netlink_test_utils",
":socket_netlink_route_util",
+ ":socket_test_util",
"//test/util:capability_util",
gtest,
],