Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Haim Daniel <haim.daniel@expand.com>
To: netfilter@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: [PATCH 2.4.37] iptables: handle IPT_RETURN from user target
Date: Wed, 18 Mar 2009 15:32:29 +0200	[thread overview]
Message-ID: <49C0F7ED.40106@expand.com> (raw)

This patch handles IPT_RETURN retcode for user's iptables' targets 
(modules).

Up until now it was handled only for the built-in RETURN iptables' target
and IPT_RETURN in a user target resulted in a NF_DROP.

Signed-off-by: Haim Daniel <haimdaniel@gmail.com>
---

diff -Nuap a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
--- a/net/ipv4/netfilter/ip_tables.c    2009-03-18 14:00:12.000000000 +0200
+++ b/net/ipv4/netfilter/ip_tables.c    2009-03-18 14:00:29.000000000 +0200
@@ -383,6 +383,11 @@ ipt_do_table(struct sk_buff **pskb,
 
                 if (verdict == IPT_CONTINUE)
                     e = (void *)e + e->next_offset;
+                else if (verdict == IPT_RETURN) {
+                    e = back;
+                    back = get_entry(table_base,
+                             back->comefrom);
+                }
                 else
                     /* Verdict */
                     break;


             reply	other threads:[~2009-03-18 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 13:32 Haim Daniel [this message]
2009-03-18 15:24 ` [PATCH 2.4.37] iptables: handle IPT_RETURN from user target Patrick McHardy

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=49C0F7ED.40106@expand.com \
    --to=haim.daniel@expand.com \
    --cc=haimdaniel@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox