mirror of https://github.com/hak5/openwrt-owl.git
swconfig: Fix a bug in use of SWITCH_PORT_FLAG_TAGGED
SWITCH_PORT_FLAG_TAGGED is a bit index, not a bit mask. Signed-off-by: Martin Mares <mj@ucw.cz> Signed-off-by: Patrick Horn <patrick.horn@gmail.com> SVN-Revision: 21708owl
parent
cfa9a1f6d6
commit
c0c0a60718
|
@ -92,7 +92,7 @@ swconfig_set_vlan_ports(struct switch_dev *dev, const struct switch_attr *attr,
|
|||
if (ports[i].id >= dev->ports)
|
||||
return -EINVAL;
|
||||
|
||||
if (dev->set_port_pvid && !(ports[i].flags & SWITCH_PORT_FLAG_TAGGED))
|
||||
if (dev->set_port_pvid && !(ports[i].flags & (1 << SWITCH_PORT_FLAG_TAGGED)))
|
||||
dev->set_port_pvid(dev, ports[i].id, val->port_vlan);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue