All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Bart De Schuymer <bdschuym@pandora.be>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] Fix ip_queue for bridged packets
Date: Tue, 28 Oct 2003 06:56:10 -0800	[thread overview]
Message-ID: <20031028065610.499a5b01.davem@redhat.com> (raw)
In-Reply-To: <200310280002.12023.bdschuym@pandora.be>

On Tue, 28 Oct 2003 00:02:11 +0100
Bart De Schuymer <bdschuym@pandora.be> wrote:

> One could argue that this makes the iptables ip_queue module a tiny bit slower 
> when dealing with non-bridged traffic, but if the user compiled her kernel 
> with bridge_netfilter support one would think she needs it.

Ok, there are other parts of netfilter (both ipv4 and ipv6) that
call skb_copy_expand() like this and I suspect we'll be copying
this bridging hack over to those places as well.  Not good.

skb_copy_expand() is not exactly a fast path, so let's just make
it copy the header area too.

Bart, does this fix your bug too?  Please test it, thanks.

--- net/core/skbuff.c.~1~	Tue Oct 28 06:54:49 2003
+++ net/core/skbuff.c	Tue Oct 28 06:58:38 2003
@@ -591,8 +591,8 @@
 	/* Set the tail pointer and length */
 	skb_put(n, skb->len);
 
-	/* Copy the data only. */
-	if (skb_copy_bits(skb, 0, n->data, skb->len))
+	/* Copy the linear data and header. */
+	if (skb_copy_bits(skb, -newheadroom, n->head, newheadroom + skb->len))
 		BUG();
 
 	copy_skb_header(n, skb);

  parent reply	other threads:[~2003-10-28 14:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-25 15:09 [PATCH] Fix ip_queue for bridged packets Bart De Schuymer
2003-10-27  8:04 ` David S. Miller
2003-10-27 23:02   ` Bart De Schuymer
2003-10-28 14:02     ` David S. Miller
2003-10-28 14:56     ` David S. Miller [this message]
2003-10-29  7:00       ` Bart De Schuymer
2003-10-29 22:25       ` Bart De Schuymer
2003-10-29 22:41         ` David S. Miller
2003-10-28 19:09     ` Scott MacKay
2003-10-31 12:53     ` Scott MacKay
2003-10-31 17:30       ` Bart De Schuymer
  -- strict thread matches above, loose matches on Subject: below --
2003-10-12 20:43 Bart De Schuymer
2003-10-14 10:58 ` Harald Welte
2003-10-15 18:33   ` Bart De Schuymer

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=20031028065610.499a5b01.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=bdschuym@pandora.be \
    --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.