From: Jozef Hamar <hamar@jozef.name>
To: netfilter-devel@vger.kernel.org
Subject: Re: NF_IP_POST_ROUTING hook question (2.4)
Date: Fri, 19 Oct 2007 10:46:39 +0200 [thread overview]
Message-ID: <20071019104639.1ebl44pdk4ooo4ck@mail.krutibrko.sk> (raw)
In-Reply-To: <f36b08ee0710160328h3a45d18k41a32dcb8f6f3d4e@mail.gmail.com>
Hi,
frankly, I'm also surprised that the 'net_device *in' is NULL.
Probably there is much simpler way to do that than my idea, but have
you tried to mark somehow those packets in NF_IP_FORWARD and in
NF_IP_POST_ROUTING matching only those packets?
Another think... why do you want to match forwarded packets in
NF_IP_POST_ROUTING? I don't see the point, but presume that you know
what you are doing...
---
Jozef Hamar
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
`-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´ `-´
I must not fear. Fear is the mind-killer. Fear is the little-death that
brings total obliteration. I will face my fear. I will permit it to pass
over me and through me. And when it has gone past I will turn the inner
eye to see its path. Where the fear has gone there will be nothing.
Only I will remain.
Quoting Yakov Lerner <iler.ml@gmail.com>:
> In the NF_IP_POST_ROUTING hook function, how can I
> tell that packet originated locally vs was forwarded ?
> I need to hook NF_IP_POST_ROUTING not NF_IP_FORWARD.
>
> I'd expect that 'net_device *in' argument to be not NULL for
> forwarded packets.
>
> But what I see is NULL for both forwarded and locally sent packets
> (in NF_IP_POST_ROUTING hook).
> Which field of skb can tell me that packet originated locally ?
>
> Yakov
> -
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-10-19 8:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 10:28 NF_IP_POST_ROUTING hook question (2.4) Yakov Lerner
2007-10-19 8:46 ` Jozef Hamar [this message]
2007-10-19 11:46 ` NF_IP_POST_ROUTING hook & sk_buff struct Garrick il Bardo
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=20071019104639.1ebl44pdk4ooo4ck@mail.krutibrko.sk \
--to=hamar@jozef.name \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).