All of lore.kernel.org
 help / color / mirror / Atom feed
From: "\"Oleg A. Arkhangelsky\"" <sysoleg@yandex.ru>
To: netfilter-devel@vger.kernel.org
Subject: Interface match in POSTROUTING
Date: Sun, 09 Oct 2011 13:05:45 +0400	[thread overview]
Message-ID: <13481318151145@web42.yandex.ru> (raw)

Hello,

I have a question regarding this piece of code in iptables.c:

                if (strcmp(chain, "POSTROUTING") == 0
                    || strcmp(chain, "OUTPUT") == 0) {
                        /* -i not valid with outgoing packets */
                        if (cs.options & OPT_VIANAMEIN)
                                xtables_error(PARAMETER_PROBLEM,
                                           "Can't use -%c with %s\n",
                                           opt2char(OPT_VIANAMEIN),
                                           chain);
                }

I agree that "-i" is not valid for locally generated packets
(that is what OUTPUT chain for). But for forwarded packets
going through POSTROUTING this is not true. As far as I
understand we can match for both input and output interface
here (as in FORWARD).

So why we need this restriction?

-- 
wbr, Oleg.

             reply	other threads:[~2011-10-09  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09  9:05 "Oleg A. Arkhangelsky" [this message]
2011-10-09 11:01 ` Interface match in POSTROUTING Jan Engelhardt

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=13481318151145@web42.yandex.ru \
    --to=sysoleg@yandex.ru \
    --cc=netfilter-devel@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 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.