Subject: Re: [PATCH net-next V4 03/13] bridge: Validate that vlan is permitted on ingress

From: Cong Wang <[email-masked]>
Date: Thu, 20 Dec 2012 07:27:11 +0000 (UTC)

On Wed, 19 Dec 2012 at 17:48 GMT, Vlad Yasevich <[email-masked]> 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?