[PATCH iptables 5/6] ebtables: add redirect test case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 extensions/libebt_redirect.c | 2 +-
 extensions/libebt_redirect.t | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 extensions/libebt_redirect.t

diff --git a/extensions/libebt_redirect.c b/extensions/libebt_redirect.c
index a88713d33145..6e653997ee99 100644
--- a/extensions/libebt_redirect.c
+++ b/extensions/libebt_redirect.c
@@ -63,7 +63,7 @@ static void brredir_print(const void *ip, const struct xt_entry_target *target,
 
 	if (redirectinfo->target == EBT_ACCEPT)
 		return;
-	printf(" --redirect-target %s", ebt_target_name(redirectinfo->target));
+	printf("--redirect-target %s", ebt_target_name(redirectinfo->target));
 }
 
 static const char* brredir_verdict(int verdict)
diff --git a/extensions/libebt_redirect.t b/extensions/libebt_redirect.t
new file mode 100644
index 000000000000..23858afa3b58
--- /dev/null
+++ b/extensions/libebt_redirect.t
@@ -0,0 +1,4 @@
+:PREROUTING
+*nat
+-j redirect;=;OK
+-j redirect --redirect-target RETURN;=;OK
-- 
2.18.1




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux