All of lore.kernel.org
 help / color / mirror / Atom feed
From: KOVACS Krisztian <hidden@balabit.hu>
To: "netfilter-devel" <netfilter-devel@lists.netfilter.org>
Cc: Harald Welte <laforge@netfilter.org>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: [PATCH 1/3] nfsim-testsuite: don't depend on NAT for name lookup checks
Date: Sat, 5 Nov 2005 12:35:31 +0100	[thread overview]
Message-ID: <200511051235.31675@nienna> (raw)

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]


  Hi,

  The current test for iptables name lookups and the -n option depends 
on NAT. This is bad, as nf_conntrack does not support NAT.

-- 
 Regards,
  Krisztian Kovacs

[-- Attachment #2: 01-nfsim-testsuite-no_nat_for_namelookup_test.patch --]
[-- Type: text/x-diff, Size: 1330 bytes --]

Don't depend on NAT to check whether NS lookup is working.

Index: nfsim-testsuite/01iptables/15namelookup.sim
===================================================================
--- nfsim-testsuite/01iptables/15namelookup.sim	(revision 4444)
+++ nfsim-testsuite/01iptables/15namelookup.sim	(working copy)
@@ -1,13 +1,13 @@
 # Test that name lookup works.
 
 # This succeeds.
-iptables -t nat -A POSTROUTING -s localhost -d localhost -p tcp -j SNAT --to-source 192.168.1.1
-iptables -t nat -D POSTROUTING -s 127.0.0.1 -d 127.0.0.1 -p tcp -j SNAT --to-source 192.168.1.1
+iptables -A INPUT -s localhost -d localhost -p tcp -j ACCEPT
+iptables -D INPUT -s 127.0.0.1 -d 127.0.0.1 -p tcp -j ACCEPT
 
 # These will fail.
 expect iptables iptables: command failed
-iptables -t nat -A POSTROUTING -n -s localhost -d 127.0.0.1 -p 6 -j SNAT --to-source 192.168.1.1
+iptables -A INPUT -n -s localhost -d 127.0.0.1 -p 6 -j ACCEPT
 expect iptables iptables: command failed
-iptables -t nat -A POSTROUTING -n -s 127.0.0.1 -d localhost -p 6 -j SNAT --to-source 192.168.1.1
+iptables -A INPUT -n -s 127.0.0.1 -d localhost -p 6 -j ACCEPT
 expect iptables iptables: command failed
-iptables -t nat -A POSTROUTING -n -s 127.0.0.1 -d 127.0.0.1 -p tcp -j SNAT --to-source 192.168.1.1 
+iptables -A INPUT -n -s 127.0.0.1 -d 127.0.0.1 -p tcp -j ACCEPT

                 reply	other threads:[~2005-11-05 11:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511051235.31675@nienna \
    --to=hidden@balabit.hu \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.