From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Netfilter Developer Mailing List
<netfilter-devel@lists.netfilter.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] chaostables
Date: Thu, 08 Mar 2007 13:59:52 +0100 [thread overview]
Message-ID: <45F008C8.2040907@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0703080723280.2448@yvahk01.tjqt.qr>
Jan Engelhardt wrote:
> Index: linux-2.6.21-rc3/net/netfilter/xt_CHAOS.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6.21-rc3/net/netfilter/xt_CHAOS.c
> @@ -0,0 +1,184 @@
> +
> +static unsigned int xt_chaos_target(struct sk_buff **pskb,
> + const struct net_device *in, const struct net_device *out,
> + unsigned int hooknum, const struct xt_target *target, const void *targinfo)
> +{
> + /* Equivalent to:
> + * -A chaos -m statistic --mode random --probability \
> + * $reject_percentage -j REJECT --reject-with host-unreach;
> + * -A chaos -m statistic --mode random --probability \
> + * $delude_percentage -j DELUDE;
> + * -A chaos -j DROP;
> + */
What does this do that can't be done by simply adding those individual
rules?
> + const struct xt_chaos_info *info = targinfo;
> +
> + if((unsigned int)net_random() <= reject_percentage)
> + return xt_reject->target(pskb, in, out, hooknum, target,
> + &reject_params);
> +
> + /* TARPIT/DELUDE may not be called from the OUTPUT chain */
> + if((*pskb)->nh.iph->protocol == IPPROTO_TCP &&
> + info->variant != XTCHAOS_NORMAL && hooknum != NF_IP_LOCAL_OUT)
> + xt_chaos_total(info, pskb, in, out, hooknum);
> +
> + return NF_DROP;
> +}
> Index: linux-2.6.21-rc3/net/netfilter/xt_DELUDE.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6.21-rc3/net/netfilter/xt_DELUDE.c
Looks like a copy of the REJECT target. What does it do,
why can't you use REJECT?
> Index: linux-2.6.21-rc3/net/netfilter/xt_portscan.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6.21-rc3/net/netfilter/xt_portscan.c
We already have the psd match for years, but decided against merging
it.
next prev parent reply other threads:[~2007-03-08 12:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 6:35 [PATCH] chaostables Jan Engelhardt
2007-03-08 12:59 ` Patrick McHardy [this message]
2007-03-08 13:14 ` Alan Cox
2007-03-08 14:55 ` James Morris
2007-03-08 16:39 ` Jan Engelhardt
2007-03-08 17:15 ` Patrick McHardy
2007-03-08 20:26 ` Jan Engelhardt
2007-03-09 9:35 ` Amin Azez
2007-03-09 10:19 ` Jan Engelhardt
2007-03-09 11:54 ` Amin Azez
2007-03-09 17:30 ` Jan Engelhardt
2007-03-09 7:54 ` Jan Engelhardt
2007-03-08 18:14 ` Alan Cox
2007-03-09 8:07 ` jimmy
2007-03-09 16:23 ` Petr Tesařík
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=45F008C8.2040907@trash.net \
--to=kaber@trash.net \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.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