struct device *dev = bm->dev.dev;
struct bridge_vlan *vlan;
+ if (dev->settings.auth) {
+ bridge_hotplug_set_member_vlans(bst, dev->config_auth_vlans, bm,
+ !dev->auth_status, true);
+ bridge_hotplug_set_member_vlans(bst, dev->auth_vlans, bm,
+ dev->auth_status, true);
+ }
+
if (dev->settings.auth && !dev->auth_status)
return;
bridge_member_add_extra_vlans(bm);
vlist_for_each_element(&bst->dev.vlans, vlan, node)
bridge_set_member_vlan(bm, vlan, true);
- if (dev->settings.auth && dev->auth_vlans)
- bridge_hotplug_set_member_vlans(bst, dev->auth_vlans, bm, true, true);
}
static int
[DEV_ATTR_DROP_UNSOLICITED_NA] = { .name = "drop_unsolicited_na", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_ARP_ACCEPT] = { .name = "arp_accept", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_AUTH] = { .name = "auth", .type = BLOBMSG_TYPE_BOOL },
+ [DEV_ATTR_AUTH_VLAN] = { .name = "auth_vlan", BLOBMSG_TYPE_ARRAY },
[DEV_ATTR_SPEED] = { .name = "speed", .type = BLOBMSG_TYPE_INT32 },
[DEV_ATTR_DUPLEX] = { .name = "duplex", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_VLAN] = { .name = "vlan", .type = BLOBMSG_TYPE_ARRAY },
s->autoneg = blobmsg_get_bool(cur);
s->flags |= DEV_OPT_AUTONEG;
}
+
+ cur = tb[DEV_ATTR_AUTH_VLAN];
+ free(dev->config_auth_vlans);
+ dev->config_auth_vlans = cur ? blob_memdup(cur) : NULL;
+
device_set_extra_vlans(dev, tb[DEV_ATTR_VLAN]);
device_set_disabled(dev, disabled);
}
free(dev->auth_vlans);
free(dev->config);
device_cleanup(dev);
+ free(dev->config_auth_vlans);
free(dev->extra_vlan);
dev->type->free(dev);
__devlock--;
DEV_ATTR_DROP_UNSOLICITED_NA,
DEV_ATTR_ARP_ACCEPT,
DEV_ATTR_AUTH,
+ DEV_ATTR_AUTH_VLAN,
DEV_ATTR_SPEED,
DEV_ATTR_DUPLEX,
DEV_ATTR_VLAN,
struct vlist_tree vlans;
struct kvlist vlan_aliases;
+ struct blob_attr *config_auth_vlans;
struct blob_attr *auth_vlans;
char ifname[IFNAMSIZ];