[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110610093413.GC17568@minipsycho.redhat.com>
Date: Fri, 10 Jun 2011 11:34:14 +0200
From: Jiri Pirko <jpirko@...hat.com>
To: Changli Gao <xiaosuo@...il.com>
Cc: David Miller <davem@...emloft.net>, pratnakarlx@...il.com,
ebiederm@...ssion.com, shemminger@...ux-foundation.org,
greearb@...delatech.com, nicolas.2p.debian@...il.com,
netdev@...r.kernel.org, kaber@...sh.net, fubar@...ibm.com,
eric.dumazet@...il.com, andy@...yhouse.net, jesse@...ira.com
Subject: Re: [PATCH v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
Fri, Jun 10, 2011 at 11:26:06AM CEST, xiaosuo@...il.com wrote:
>On Fri, Jun 10, 2011 at 4:35 PM, Jiri Pirko <jpirko@...hat.com> wrote:
>> +
>> +/* Should be used only to revert vlan_reorder_header action */
>> +static struct sk_buff *vlan_unreorder_header(struct sk_buff *skb)
>> +{
>> + unsigned char *mac_header;
>> + struct vlan_ethhdr *veth;
>> +
>> + if (skb_cow(skb, skb_headroom(skb)) < 0)
>> + return NULL;
>
>I think we need to make sure if there is enough headroom for this
>header expansion.
Well the header expansion was previously there so there should be place
there in all cases, or am I wrong?
>
>> + skb->mac_header -= VLAN_HLEN;
>
>skb->mac_len isn't adjusted. You forgot to move the headers resetting
>after vlan_untag().
that is correct, I'll move that. I'll also add reset after unreorder.
Thanks Changli.
Jirka
>
>
>
>--
>Regards,
>Changli Gao(xiaosuo@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists