diff --git a/src/config.c b/src/config.c index af87ed6ebcd7a6a1e88f94e77172d534dda59dd6..e5a68cc8fdc553431cf1ada361a42d1faca677a4 100644 --- a/src/config.c +++ b/src/config.c @@ -1041,7 +1041,7 @@ static int cntlr_config_get_credentials(struct controller_config *c, [CRED_KEY] = { .name = "key", .type = UCI_TYPE_STRING }, [CRED_VLAN] = { .name = "vid", .type = UCI_TYPE_STRING }, [CRED_TYPE] = { .name = "type", .type = UCI_TYPE_STRING }, - [CRED_D_BSTA] = { .name = "disallow_bsta", .type = UCI_TYPE_LIST }, + [CRED_D_BSTA] = { .name = "disallow_bsta_profile", .type = UCI_TYPE_LIST }, [CRED_ENABLED] = { .name = "enabled", .type = UCI_TYPE_STRING }, [CRED_VENDOR_IE] = { .name = "vendor_ie", .type = UCI_TYPE_LIST } }; @@ -1173,7 +1173,13 @@ static int cntlr_config_get_credentials(struct controller_config *c, struct uci_element *x; uci_foreach_element(&tb[CRED_D_BSTA]->v.list, x) { - cred->disallow_bsta |= atoi(x->name); + uint8_t profile; + + profile = atoi(x->name); + if (profile > 2) + continue; + + cred->disallow_bsta |= profile; } }