From: Alexey Toptygin Subject: Re: Support for longest prefix IP address match in iptables? Date: Fri, 28 Apr 2006 21:09:32 +0000 (UTC) Message-ID: References: <38539.192.168.20.50.1146211317.squirrel@pop-mail> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: netfilter-devel@lists.netfilter.org, nbasker@india.tejasnetworks.com Return-path: To: shyam@india.tejasnetworks.com In-Reply-To: <38539.192.168.20.50.1146211317.squirrel@pop-mail> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org On Fri, 28 Apr 2006 shyam@india.tejasnetworks.com wrote: > We are using iptables to match the destination ip-addresses > using the command > > iptables -t mangle -A POSTROUTING -d 10.12.13.14 -j MARK --set-mark=5 > iptables -t mangle -A POSTROUTING -d 10.12.13.0/24 -j MARK --set-mark=7 MARK is a non-terminating target, so _both_ rules get applied. The later one overrides the earlier one. You need to insert a rule with a terminating target (i.e. ACCEPT) between these. Alexey