> On Oct 12, 2015, at 3:01 PM, Nikolay Aleksandrov <[email protected]> wrote: > > From: Nikolay Aleksandrov <[email protected]> > > We shouldn't allow BRIDGE_VLAN_INFO_PVID flag in VLAN ranges. > > Signed-off-by: Nikolay Aleksandrov <[email protected]> > --- > net/switchdev/switchdev.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c > index 6e4a4f9ad927..256c596de896 100644 > --- a/net/switchdev/switchdev.c > +++ b/net/switchdev/switchdev.c > @@ -720,6 +720,9 @@ static int switchdev_port_br_afspec(struct net_device > *dev, > if (vlan.vid_begin) > return -EINVAL; > vlan.vid_begin = vinfo->vid; > + /* don't allow range of pvids */ > + if (vlan.flags & BRIDGE_VLAN_INFO_PVID) > + return -EINVAL; > } else if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END) { > if (!vlan.vid_begin) > return -EINVAL;
Acked-by: Elad Raz <[email protected]> > -- > 2.4.3 > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to [email protected] > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
