* [PATCH] extensions: add tests for comp match options
@ 2018-02-06 18:03 Harsha Sharma
2018-02-06 23:40 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Harsha Sharma @ 2018-02-06 18:03 UTC (permalink / raw)
To: pablo, harshasharmaiitr; +Cc: netfilter-devel
This patch adds test for ipcomp flow match specified by its SPI value
and move tests for ipcomp protocol to libxt_policy.t
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
extensions/libxt_ipcomp.t | 8 +++-----
extensions/libxt_policy.t | 3 +++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/extensions/libxt_ipcomp.t b/extensions/libxt_ipcomp.t
index ce111142..4b989d4c 100644
--- a/extensions/libxt_ipcomp.t
+++ b/extensions/libxt_ipcomp.t
@@ -1,5 +1,3 @@
-:INPUT,FORWARD
--m policy --dir in --pol ipsec --proto ipcomp;=;OK
--m policy --dir in --pol none --proto ipcomp;;FAIL
--m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto ipcomp;=;OK
--m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto ipcomp --mode tunnel --tunnel-dst 10.0.0.0/8 --tunnel-src 10.0.0.0/8 --next --reqid 2;=;OK
+:INPUT,OUTPUT
+-p 108 -m ipcomp --ipcompspi 0x12 -j DROP;=;OK
+-p 108 -m ipcomp ! --ipcompspi 0x12 -j ACCEPT;=;OK
diff --git a/extensions/libxt_policy.t b/extensions/libxt_policy.t
index 24a3e2f4..6524122b 100644
--- a/extensions/libxt_policy.t
+++ b/extensions/libxt_policy.t
@@ -1,5 +1,8 @@
:INPUT,FORWARD
-m policy --dir in --pol ipsec;=;OK
+-m policy --dir in --pol ipsec --proto ipcomp;=;OK
-m policy --dir in --pol ipsec --strict;;FAIL
+-m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto ipcomp;=;OK
-m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto esp --mode tunnel --tunnel-dst 10.0.0.0/8 --tunnel-src 10.0.0.0/8 --next --reqid 2;=;OK
-m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto esp --tunnel-dst 10.0.0.0/8;;FAIL
+-m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto ipcomp --mode tunnel --tunnel-dst 10.0.0.0/8 --tunnel-src 10.0.0.0/8 --next --reqid 2;=;OK
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] extensions: add tests for comp match options
2018-02-06 18:03 [PATCH] extensions: add tests for comp match options Harsha Sharma
@ 2018-02-06 23:40 ` Pablo Neira Ayuso
2018-02-06 23:42 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2018-02-06 23:40 UTC (permalink / raw)
To: Harsha Sharma; +Cc: netfilter-devel
On Tue, Feb 06, 2018 at 11:33:30PM +0530, Harsha Sharma wrote:
> This patch adds test for ipcomp flow match specified by its SPI value
> and move tests for ipcomp protocol to libxt_policy.t
Applied, thanks Harsha.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] extensions: add tests for comp match options
2018-02-06 23:40 ` Pablo Neira Ayuso
@ 2018-02-06 23:42 ` Pablo Neira Ayuso
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2018-02-06 23:42 UTC (permalink / raw)
To: Harsha Sharma; +Cc: netfilter-devel
On Wed, Feb 07, 2018 at 12:40:26AM +0100, Pablo Neira Ayuso wrote:
> On Tue, Feb 06, 2018 at 11:33:30PM +0530, Harsha Sharma wrote:
> > This patch adds test for ipcomp flow match specified by its SPI value
> > and move tests for ipcomp protocol to libxt_policy.t
>
> Applied, thanks Harsha.
Wait.
These tests are failing:
# python iptables-test.py extensions/libxt_ipcomp.t
extensions/libxt_ipcomp.t: ERROR: line 2 (cannot find: iptables -I INPUT -p 108 -m ipcomp --ipcompspi 0x12 -j DROP)
extensions/libxt_ipcomp.t: ERROR: line 3 (cannot find: iptables -I INPUT -p 108 -m ipcomp ! --ipcompspi 0x12 -j ACCEPT)
Please, revisit and revamp. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-06 23:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 18:03 [PATCH] extensions: add tests for comp match options Harsha Sharma
2018-02-06 23:40 ` Pablo Neira Ayuso
2018-02-06 23:42 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).