summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-09-30 16:02:46 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-30 16:04:26 -0700
commit6f8d64f4229be58814319003a397b971ca9b4e1b (patch)
tree5ce3e40ad5e76617e288bbd89fa385b8fddcfdd1 /test/syscalls
parent7f9e13053e84b82c67c12a4964fa4703ebaa571f (diff)
ip6tables: redirect support
Adds support for the IPv6-compatible redirect target. Redirection is a limited form of DNAT, where the destination is always the localhost. Updates #3549. PiperOrigin-RevId: 334698344
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/linux/ip6tables.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/syscalls/linux/ip6tables.cc b/test/syscalls/linux/ip6tables.cc
index f08f2dc55..de0a1c114 100644
--- a/test/syscalls/linux/ip6tables.cc
+++ b/test/syscalls/linux/ip6tables.cc
@@ -95,16 +95,10 @@ TEST(IP6TablesBasic, GetRevision) {
};
socklen_t rev_len = sizeof(rev);
- // TODO(gvisor.dev/issue/3549): IPv6 redirect support.
- const int retval =
- getsockopt(sock, SOL_IPV6, IP6T_SO_GET_REVISION_TARGET, &rev, &rev_len);
- if (IsRunningOnGvisor()) {
- EXPECT_THAT(retval, SyscallFailsWithErrno(ENOPROTOOPT));
- return;
- }
-
// Revision 0 exists.
- EXPECT_THAT(retval, SyscallSucceeds());
+ EXPECT_THAT(
+ getsockopt(sock, SOL_IPV6, IP6T_SO_GET_REVISION_TARGET, &rev, &rev_len),
+ SyscallSucceeds());
EXPECT_EQ(rev.revision, 0);
// Revisions > 0 don't exist.