From: Laszlo Attila Toth <panther@balabit.hu>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 2/2] Addrtype match extension: limit addrtype check on the packet's interface
Date: Sat, 20 Oct 2007 16:50:55 +0200 [thread overview]
Message-ID: <471A15CF.2080609@balabit.hu> (raw)
In-Reply-To: <47172481.601@trash.net>
Patrick McHardy írta:
> Laszlo Attila Toth wrote:
>> +static bool match_v1(const struct sk_buff *skb,
>> const struct net_device *in, const struct net_device *out,
>> const struct xt_match *match, const void *matchinfo,
>> int offset, unsigned int protoff, bool *hotdrop)
>> {
>> const struct ipt_addrtype_info *info = matchinfo;
>> const struct iphdr *iph = ip_hdr(skb);
>> + const struct net_device *limit_dev = (info->flags &
>> IPT_ADDRTYPE_LIMIT_IFACE) ? in : NULL;
>
>
> The match can be used on any hook, using the incoming interface
> is a bit unflexible. How about using the incoming interface for
> src-address and outgoing interface for destination address matches?
But what happens when I use only dst-type in the rule in the INPUT chain?
I think in the INPUT chain the incoming interface with the dst-type and
in the OUTPUT chain the outgoing interface with the src-type parameter
could be used. And what should I check in the other 3 chains? In FORWARD
it seems pointless to let the limit-iface option.
> Alternatively add two flags to specify which device to use. You'll
> need to add proper checks of course to make sure the interface is
> valid for the hook the match is used in.
Hm, I need a hooknum parameter in the match function which exists only
in the target functions.
--
Attila
-
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-20 14:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 14:03 [PATCH 0/2] address type match limited to incoming interface Laszlo Attila Toth
2007-10-12 14:07 ` [PATCH 1/2] Find address type on a specific or on any interface Laszlo Attila Toth
2007-10-12 14:07 ` [PATCH 2/2] Addrtype match extension: limit addrtype check on the packet's interface Laszlo Attila Toth
2007-10-18 9:16 ` Patrick McHardy
2007-10-18 11:34 ` Laszlo Attila Toth
2007-10-20 14:50 ` Laszlo Attila Toth [this message]
2007-10-18 9:13 ` [PATCH 1/2] Find address type on a specific or on any interface Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2007-10-05 15:20 Tóth László Attila
2007-10-05 15:23 ` [PATCH 2/2] Addrtype match extension: limit addrtype check on the packet's interface Tóth László Attila
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=471A15CF.2080609@balabit.hu \
--to=panther@balabit.hu \
--cc=kaber@trash.net \
--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).