netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: "Linux 802.1Q VLAN" <vlan@wanfear.com>
Cc: "'Tommy Christensen'" <tommy.christensen@tpack.net>,
	netdev@oss.sgi.com, bridge <bridge@osdl.org>
Subject: Re: [Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged{I,AR}P packets
Date: Wed, 08 Oct 2003 09:34:20 -0700	[thread overview]
Message-ID: <3F843C8C.4030100@candelatech.com> (raw)
In-Reply-To: <5B537508CDBED3118403009027745A210B8C14A1@knant18.kna.flextronics.com>

Christian Darnell wrote:
> -----Original Message-----
> 
>>From: Tommy Christensen [mailto:tommy.christensen@tpack.net]
>>Sent: Wednesday, October 08, 2003 10:09 AM
>>To: Christian Darnell
>>Cc: 'Linux 802.1Q VLAN'; Bart De Schuymer; netdev@oss.sgi.com; bridge
>>Subject: Re: [Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables
>>"see" bridged VLAN tagged{I,AR}P packets
>>
>>
>>
>>This is because the VLAN code is mangling shared data.
>>You need to do something like this:
>>
>>
>>--- linux-2.4/net/8021q/vlan_dev.c.org	2003-02-25 15:23:09.000000000
>>+0100
>>+++ linux-2.4/net/8021q/vlan_dev.c	2003-10-07 16:01:29.000000000 +0200
>>@@ -75,7 +75,12 @@
>>static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff
>>*skb)
>>{
>>	if (VLAN_DEV_INFO(skb->dev)->flags & 1) {
>>-		skb = skb_share_check(skb, GFP_ATOMIC);
>>+		if (skb_shared(skb) || skb_cloned(skb)) {
>>+			struct sk_buff *nskb;
>>+			nskb = skb_copy(skb, GFP_ATOMIC);
>>+			kfree_skb(skb);
>>+			skb = nskb;
>>+		}

Thanks for catching that!

So, what good is skb_share_check then?
Maybe we should have a skb_share_or_cloned_check() ?

Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2003-10-08 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08  8:18 [Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged{I,AR}P packets Christian Darnell
2003-10-08 16:34 ` Ben Greear [this message]
2003-10-08 16:33   ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2003-10-07  9:06 Re: [PATCH/RFC] Let {ip,arp}tables " Christian Darnell
2003-10-08  8:09 ` [Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables " Tommy Christensen
2003-10-08 15:58   ` David S. Miller

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=3F843C8C.4030100@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=bridge@osdl.org \
    --cc=netdev@oss.sgi.com \
    --cc=tommy.christensen@tpack.net \
    --cc=vlan@wanfear.com \
    /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).