Skip to content
Snippets Groups Projects
Commit 4d7ba3ae authored by Jakob Olsson's avatar Jakob Olsson
Browse files

map-controller: introduce enabled vendor extension to ap-autoconfig

parent e35699e1
Branches jo-devel-6.2
No related tags found
No related merge requests found
Pipeline #27334 failed
...@@ -230,6 +230,7 @@ int cntlr_gen_wsc(struct controller *c, struct cmdu_buff *frm, ...@@ -230,6 +230,7 @@ int cntlr_gen_wsc(struct controller *c, struct cmdu_buff *frm,
uint8_t oui[3] = {IOP_VENDOR_ID_1, IOP_VENDOR_ID_2, IOP_VENDOR_ID_3}; uint8_t oui[3] = {IOP_VENDOR_ID_1, IOP_VENDOR_ID_2, IOP_VENDOR_ID_3};
uint8_t out[256] = {0}; uint8_t out[256] = {0};
size_t olen = 256; size_t olen = 256;
#define ATTR_ENABLED (0x4C) /* IOPSYS m2 vendor extension */
t = cmdu_reserve_tlv(frm, 1000); t = cmdu_reserve_tlv(frm, 1000);
if (!t) if (!t)
...@@ -259,6 +260,7 @@ int cntlr_gen_wsc(struct controller *c, struct cmdu_buff *frm, ...@@ -259,6 +260,7 @@ int cntlr_gen_wsc(struct controller *c, struct cmdu_buff *frm,
ATTR_PROTO, strlen(iface_cred->br->proto), iface_cred->br->proto, ATTR_PROTO, strlen(iface_cred->br->proto), iface_cred->br->proto,
ATTR_BR_IP, 4, &iface_cred->br->ipaddr.addr.ip4.s_addr, ATTR_BR_IP, 4, &iface_cred->br->ipaddr.addr.ip4.s_addr,
ATTR_VID, 2, &(iface_cred->br->id), ATTR_VID, 2, &(iface_cred->br->id),
ATTR_ENABLED, 1, &(iface_cred->enabled),
-1); -1);
ret = wsc_build_m2(msg, msglen, &cred, out, olen, &m2, &m2_size); ret = wsc_build_m2(msg, msglen, &cred, out, olen, &m2, &m2_size);
......
...@@ -431,6 +431,7 @@ static int cntlr_config_get_credentials(struct controller_config *c, ...@@ -431,6 +431,7 @@ static int cntlr_config_get_credentials(struct controller_config *c,
CRED_VLAN, CRED_VLAN,
CRED_MAP, CRED_MAP,
CRED_D_BSTA, CRED_D_BSTA,
CRED_ENABLED,
NUM_CREDS, NUM_CREDS,
}; };
const struct uci_parse_option opts[] = { const struct uci_parse_option opts[] = {
...@@ -440,7 +441,8 @@ static int cntlr_config_get_credentials(struct controller_config *c, ...@@ -440,7 +441,8 @@ static int cntlr_config_get_credentials(struct controller_config *c,
[CRED_KEY] = { .name = "key", .type = UCI_TYPE_STRING }, [CRED_KEY] = { .name = "key", .type = UCI_TYPE_STRING },
[CRED_VLAN] = { .name = "vlan", .type = UCI_TYPE_STRING }, [CRED_VLAN] = { .name = "vlan", .type = UCI_TYPE_STRING },
[CRED_MAP] = { .name = "multi_ap", .type = UCI_TYPE_STRING }, [CRED_MAP] = { .name = "multi_ap", .type = UCI_TYPE_STRING },
[CRED_D_BSTA] = { .name = "disallow_bsta", .type = UCI_TYPE_STRING } [CRED_D_BSTA] = { .name = "disallow_bsta", .type = UCI_TYPE_STRING },
[CRED_ENABLED] = { .name = "enabled", .type = UCI_TYPE_STRING }
}; };
struct uci_option *tb[NUM_CREDS]; struct uci_option *tb[NUM_CREDS];
struct iface_credential *cred; struct iface_credential *cred;
...@@ -532,6 +534,9 @@ static int cntlr_config_get_credentials(struct controller_config *c, ...@@ -532,6 +534,9 @@ static int cntlr_config_get_credentials(struct controller_config *c,
if (tb[CRED_D_BSTA]) if (tb[CRED_D_BSTA])
cred->disallow_bsta = atoi(tb[CRED_D_BSTA]->v.string); cred->disallow_bsta = atoi(tb[CRED_D_BSTA]->v.string);
if (tb[CRED_ENABLED])
cred->enabled = atoi(tb[CRED_ENABLED]->v.string);
(*num)++; (*num)++;
list_add_tail(&cred->list, iface_list); list_add_tail(&cred->list, iface_list);
return 0; return 0;
......
...@@ -47,6 +47,7 @@ struct iface_credential { ...@@ -47,6 +47,7 @@ struct iface_credential {
uint8_t multi_ap; uint8_t multi_ap;
enum aptype mode; enum aptype mode;
uint8_t disallow_bsta; uint8_t disallow_bsta;
bool enabled;
struct netif_vlan *br; struct netif_vlan *br;
struct list_head list; struct list_head list;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment