diff options
Diffstat (limited to 'test/iptables/nat.go')
-rw-r--r-- | test/iptables/nat.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/iptables/nat.go b/test/iptables/nat.go index 72c413af2..b5c6f927e 100644 --- a/test/iptables/nat.go +++ b/test/iptables/nat.go @@ -20,7 +20,7 @@ import ( ) const ( - redirectPort = 42 + redirectPort = 42 ) func init() { @@ -28,7 +28,7 @@ func init() { RegisterTestCase(NATDropUDP{}) } -// InputRedirectUDPPort tests that packets are redirected to different port. +// NATRedirectUDPPort tests that packets are redirected to different port. type NATRedirectUDPPort struct{} // Name implements TestCase.Name. @@ -38,8 +38,7 @@ func (NATRedirectUDPPort) Name() string { // ContainerAction implements TestCase.ContainerAction. func (NATRedirectUDPPort) ContainerAction(ip net.IP) error { - if err := filterTable("-t", "nat", "-A", "PREROUTING", "-p", "udp", "-j", "REDIRECT", "--to-ports", - fmt.Sprintf("%d", redirectPort)); err != nil { + if err := filterTable("-t", "nat", "-A", "PREROUTING", "-p", "udp", "-j", "REDIRECT", "--to-ports", fmt.Sprintf("%d", redirectPort)); err != nil { return err } @@ -64,8 +63,7 @@ func (NATDropUDP) Name() string { // ContainerAction implements TestCase.ContainerAction. func (NATDropUDP) ContainerAction(ip net.IP) error { - if err := filterTable("-t", "nat", "-A", "PREROUTING", "-p", "udp", "-j", "REDIRECT", "--to-ports", - fmt.Sprintf("%d", redirectPort)); err != nil { + if err := filterTable("-t", "nat", "-A", "PREROUTING", "-p", "udp", "-j", "REDIRECT", "--to-ports", fmt.Sprintf("%d", redirectPort)); err != nil { return err } |