All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@lists.netfilter.org>
Subject: Re: [PATCH 1/2] xt_u32 (kernel) - match arbitrary bits and bytes of a packet
Date: Mon, 04 Jun 2007 13:25:55 +0200	[thread overview]
Message-ID: <4663F6C3.9070100@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0706031929450.10578@yvahk01.tjqt.qr>

Jan Engelhardt wrote:
> On Jun 3 2007 19:23, Patrick McHardy wrote:
> 
>>>+	uint32_t min, max;
>>
>>We use u_int32_t in all netfilter files. Also
>>
> 
> Is this a showstopper? After all, uint32_t is close to the same-named 
> C99 type. It's kinda strange to have __u32, u32, u_int32_t and uint32_t 
> for one and the same thing.


We try to keep things consistent at least along subsystems, so yes,
I won't apply a patch that adds to the inconsistency.

>>>+	if (head == NULL) {
>>>+		*hotdrop = 1;
>>>+		return false;
>>>+	}
>>
>>might as well BUG_ON since a copy of size <= skb->len cant fail.
> 
> 
> Hmm, scripts/checkpatch.pl barfs on BUG_ONs :-)
> Use WARN_ON + hotdrop, or still go with BUG_ON?


BUG_ON please, this is what we use for all other impossible
skb_copy_bits failures.

>>>+	base = head;
>>>+	for (testind = 0; testind < data->ntests; ++testind) {
>>>+		ct = &data->tests[testind];
>>>+
>>>+		at  = 0;
>>>+		pos = ct->location[0].number;
>>>+		if (at + pos + 3 > skb->len || at + pos < 0) {
>>>+			spin_unlock_bh(&xt_u32_lock);
>>>+			return false;
>>
>>what about inversion?
> 
> 
> If it was not supported before, I have not implemented it.


We don't add new matches without inversion anymore, so please add
support for it.

  reply	other threads:[~2007-06-04 11:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02 21:46 [PATCH 0/2] xt_u32 - match arbitrary bits and bytes of a packet Jan Engelhardt
2007-06-02 21:50 ` [PATCH 1/2] xt_u32 (kernel) " Jan Engelhardt
2007-06-02 21:50   ` Jan Engelhardt
2007-06-03 17:23   ` Patrick McHardy
2007-06-03 20:09     ` Jan Engelhardt
2007-06-04 11:25       ` Patrick McHardy [this message]
2007-06-05  7:07     ` Jan Engelhardt
2007-06-05 11:34       ` Patrick McHardy
2007-06-02 21:51 ` [PATCH 2/2] xt_u32 (iptables) " Jan Engelhardt
2007-06-03  5:07 ` [PATCH 0/2] xt_u32 " Valdis.Kletnieks
2007-06-03  8:20   ` 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=4663F6C3.9070100@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@linux01.gwdg.de \
    --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 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.