All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Sven Schnelle <svens@bitebene.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] xt_TCPOPTSTRIP 20071006 (kernel)
Date: Mon, 08 Oct 2007 07:00:47 +0200	[thread overview]
Message-ID: <4709B97F.2000106@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0710061659271.5969@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> Add xt_TCPOPTSTRIP, a module to replace TCP options by NOPs.

A few minor comments:

> +#define tcpoptstrip_set_bit(bmap, idx) \
> +	(bmap[(idx) >> 5] |= 1UL << (idx & 31))
> +#define tcpoptstrip_test_bit(bmap, idx) \
> +	(((1UL << (idx & 31)) & bmap[(idx) >> 5]) != 0)


Why UL? You're using 32 bit variables for the bitmap ..


> +struct xt_tcpoptstrip_info {
> +	u_int32_t strip_bmap[8];
> +};
> +


> +config NETFILTER_XT_TARGET_TCPOPTSTRIP
> +	tristate '"TCPOPTSTRIP" target support'
> +	depends on NETFILTER_XTABLES


EXPERIMENTAL please

> +	---help---
> +	  This option adds a "TCPOPTSTRIP" target, which allows you to strip
> +	  TCP options from TCP packets.


> +static unsigned int
> +xt_tcpoptstrip_target6(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)
> +{
> +	struct ipv6hdr *ipv6h = ipv6_hdr(*pskb);
> +	unsigned int tcphoff;
> +	u_int8_t nexthdr;
> +
> +	nexthdr = ipv6h->nexthdr;
> +	tcphoff = ipv6_skip_exthdr(*pskb, sizeof(*ipv6h), &nexthdr);


This needs #ifdef CONFIG_IPV6

A Signed-off-by: line by Sven would also be appreciated - I guess
you can just include the original one since you modified his
patch.

  parent reply	other threads:[~2007-10-08  5:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28  6:56 [RFC] TCPOPTSTRIP target Sven Schnelle
2007-09-28 14:16 ` Jan Engelhardt
2007-09-28 14:44   ` Jan Engelhardt
2007-09-28 14:57     ` Jan Engelhardt
2007-09-28 15:02     ` Patrick McHardy
2007-09-28 15:33       ` Jan Engelhardt
2007-09-28 15:34         ` Jan Engelhardt
2007-09-28 15:44         ` Patrick McHardy
2007-09-28 16:04           ` Jan Engelhardt
2007-09-28 16:07             ` Patrick McHardy
2007-09-29  9:04       ` Sven Schnelle
2007-09-29  9:16         ` Jan Engelhardt
2007-09-29 14:33         ` Patrick McHardy
2007-09-29 17:23         ` Krzysztof Oledzki
2007-10-02 14:09         ` Sven Schnelle
2007-10-02 17:32           ` [RFC] TCPOPTSTRIP target (netfilter) Jan Engelhardt
2007-10-02 17:56             ` Krzysztof Oledzki
2007-10-02 17:57               ` Jan Engelhardt
2007-10-02 18:01                 ` Jan Engelhardt
2007-10-04  5:04             ` Patrick McHardy
2007-10-02 14:09         ` [RFC] TCPOPTSTRIP target Sven Schnelle
2007-10-02 14:20           ` Sven Schnelle
2007-10-02 17:49             ` Krzysztof Oledzki
2007-10-02 17:51             ` [RFC] TCPOPTSTRIP target (iptables) Jan Engelhardt
2007-10-06 14:10               ` Sven Schnelle
2007-10-06 14:33                 ` Jan Engelhardt
2007-10-06 14:53                   ` Sven Schnelle
2007-10-06 15:00                   ` [PATCH] xt_TCPOPTSTRIP 20071006 (kernel) Jan Engelhardt
2007-10-06 15:19                     ` Sven Schnelle
2007-10-06 15:21                       ` Jan Engelhardt
2007-10-08  5:05                         ` Patrick McHardy
2007-10-08  5:00                     ` Patrick McHardy [this message]
2007-10-08  7:58                       ` Sven Schnelle
2007-10-08  8:20                         ` Patrick McHardy
2007-10-08 15:55                       ` Jan Engelhardt
2007-10-08 16:27                         ` Patrick McHardy
2007-10-08 16:42                           ` Jan Engelhardt
2007-10-06 15:01                   ` [PATCH] TCPOPTSTRIP 20071006 (iptables) Jan Engelhardt
2007-10-06 15:37                     ` Krzysztof Oledzki
2007-10-06 15:52                       ` [PATCH 1/1] TCPOPTSTRIP 20071006 descriptions (iptables) Jan Engelhardt
2007-10-08  8:22                     ` [PATCH] TCPOPTSTRIP 20071006 (iptables) Patrick McHardy
2007-09-29  9:05     ` [RFC] TCPOPTSTRIP target Sven Schnelle
2007-10-02 17:22   ` Sven Schnelle
2007-10-02 17:31     ` 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=4709B97F.2000106@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@computergmbh.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=svens@bitebene.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.