[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <kaueke$69b$1@ger.gmane.org>
Date: Thu, 20 Dec 2012 07:27:11 +0000 (UTC)
From: Cong Wang <xiyou.wangcong@...il.com>
To: netdev@...r.kernel.org
Subject: Re: [PATCH net-next V4 03/13] bridge: Validate that vlan is
permitted on ingress
On Wed, 19 Dec 2012 at 17:48 GMT, Vlad Yasevich <vyasevic@...hat.com> wrote:
> +static inline u16 br_get_vlan(const struct sk_buff *skb)
> +{
> + u16 tag;
> +
> + if (vlan_tx_tag_present(skb))
> + return vlan_tx_tag_get(skb) & VLAN_VID_MASK;
> +
> + if (vlan_get_tag(skb, &tag))
> + return 0;
> +
> + return tag & VLAN_VID_MASK;
> +}
> +
Nitpick:
The name br_get_vlan() can easily confuse people with br_vlan_find().
Also, this function looks like not bridge-specific, how about moving
it to if_vlan.h?
--
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