diff --git a/src/core/cntlr_tlv_generator.c b/src/core/cntlr_tlv_generator.c index a5de78374b7364b9470a58e1634f4e480e1f7f59..984ce596767190bf3f3611d764f3e6d83647960c 100644 --- a/src/core/cntlr_tlv_generator.c +++ b/src/core/cntlr_tlv_generator.c @@ -237,6 +237,9 @@ int cntlr_gen_wsc(struct controller *c, struct cmdu_buff *frm, uint8_t *m2; uint16_t m2_size; int i, rv, ret; + uint8_t oui[3] = {IOP_VENDOR_ID_1, IOP_VENDOR_ID_2, IOP_VENDOR_ID_3}; + uint8_t out[256] = {0}; + size_t olen = 256; t = cmdu_reserve_tlv(frm, 2000); if (!t) @@ -278,7 +281,15 @@ int cntlr_gen_wsc(struct controller *c, struct cmdu_buff *frm, memcpy(cred.bk_ssid, iface_cred->bk_ssid, sizeof(iface_cred->bk_ssid)); memcpy(cred.bk_key, iface_cred->bk_key, sizeof(iface_cred->bk_key)); - ret = wsc_build_m2(msg, msglen, &cred, &m2, &m2_size); + wsc_build_vendor_extension(out, &olen, oui, + ATTR_BRIDGE, strlen(iface_cred->br->network), iface_cred->br->network, + ATTR_PROTO, strlen(iface_cred->br->proto), iface_cred->br->proto, + ATTR_VID, 2, &(iface_cred->br->id), + ATTR_BK_KEY, strlen(iface_cred->bk_key), iface_cred->bk_key, + ATTR_BK_SSID, strlen(iface_cred->bk_ssid), iface_cred->bk_ssid, + -1); + + ret = wsc_build_m2(msg, msglen, &cred, out, olen, &m2, &m2_size); if (ret) { dbg("Error building m2!\n"); return ret; diff --git a/src/core/config.h b/src/core/config.h index f201690338ab9267e17b099cd66afef09f834fc4..537ca667108c03501148a6a261430d3de96c4b16 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -32,7 +32,7 @@ struct stax { struct netif_vlan { char network[16]; char proto[8]; - uint8_t id; + uint16_t id; struct ip_address ipaddr; struct list_head list; };