summaryrefslogtreecommitdiffhomepage
path: root/test/iptables/iptables_test.go
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2020-02-18 11:30:42 -0800
committerNayana Bidari <nybidari@google.com>2020-02-18 11:30:42 -0800
commitb30b7f3422202232ad1c385a7ac0d775151fee2f (patch)
tree3b8de1ccfc8e6abbe7ccb5e35b3fc5832acad0ca /test/iptables/iptables_test.go
parentfae3de21af7f50266565643c6283912b087b0f5a (diff)
Add nat table support for iptables.
Add nat table support for Prerouting hook with Redirect option. Add tests to check redirect of ports.
Diffstat (limited to 'test/iptables/iptables_test.go')
-rw-r--r--test/iptables/iptables_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/iptables/iptables_test.go b/test/iptables/iptables_test.go
index 46a7c99b0..7d061acba 100644
--- a/test/iptables/iptables_test.go
+++ b/test/iptables/iptables_test.go
@@ -196,12 +196,24 @@ func TestNATRedirectUDPPort(t *testing.T) {
}
}
+func TestNATRedirectTCPPort(t *testing.T) {
+ if err := singleTest(NATRedirectTCPPort{}); err != nil {
+ t.Fatal(err)
+ }
+}
+
func TestNATDropUDP(t *testing.T) {
if err := singleTest(NATDropUDP{}); err != nil {
t.Fatal(err)
}
}
+func TestNATAcceptAll(t *testing.T) {
+ if err := singleTest(NATAcceptAll{}); err != nil {
+ t.Fatal(err)
+ }
+}
+
func TestFilterInputDropTCPDestPort(t *testing.T) {
if err := singleTest(FilterInputDropTCPDestPort{}); err != nil {
t.Fatal(err)