NetFilter
[Top] [All Lists]

RE: Using SAME target problems

To: <netfilter@lists.netfilter.org>
Subject: RE: Using SAME target problems
From: "johnpeng" <johnpeng@unitytek.com.tw>
Date: Mon, 26 Feb 2007 11:55:57 +0800
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
In-reply-to:
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
Sender: netfilter-bounces@lists.netfilter.org
Thread-index: AcdZWaaz6RUyEJVHQuWfiS7BhuKgnQAADmQQ
Dear all:
   I find two problems of using ?SAME? target, I am using kernel 2.6.17.7
and iptables 1.3.5
1.  Multiple calls of check function:
     When we turn on the Debug messages ( by recompiling), I find that the
check function of SAME target would be called multiple times, 
i.e   iptables ?t nat ?A PREROUTING ?d 10.10.10.1 -j SAME ?to
172.31.0.1-172.31.0.3
     iptables ?t nat ?A PREROUTING ?d 10.10.10.2 ?j DNAT ?to-destination
192.168.1.1
         ?. Other NAT rules

     netfilter travels the second DNAT rules, but calls the check function
of the first rules of ?SAME? target
     , so does every following NAT rules.
    My question is , I didn?t see the same situation in kernel 2.4 , is that
due to some framework change in kernel 2.6 ?

2. Can?t remove the ?SAME? target:
When we issue the removal ?iptables ?t nat ?D PREROUTING ?d 10.10.10.1 -j
SAME ?to 172.31.0.1-172.31.0.3?, 
Iptables get reply of ?iptables: No chain/target/match by that name?,
 it seems the memory comparison is not equal with user level and kernel
level passed target info data structure, 
Any solution?

Thanks for your help!!



<Prev in Thread] Current Thread [Next in Thread>
  • RE: Using SAME target problems, johnpeng <=