On Tue, 31 Dec 2019 at 12:40, Jouni Malinen <j@xxxxx> wrote: > > On Tue, Dec 31, 2019 at 12:04:26PM +0300, bilalhp@xxxxxxxxx wrote: > > Application Extension attribute is defined in WPS Spec v2.06 page 105. > > This patch makes hostapd add this application extension data to WPS IE > > if configured. The implementation is very similar to vendor extension. > > > > Added a new optional entry "wps_application_ext" to hostapd config > > file to configure this. > > > diff --git a/hostapd/config_file.c b/hostapd/config_file.c > > @@ -3616,6 +3616,9 @@ static int hostapd_config_fill(struct hostapd_config *conf, > > + } else if (os_strcmp(buf, "wps_application_ext") == 0) { > > + wpabuf_free(bss->wps_application_ext[0]); > > + bss->wps_application_ext[0] = wpabuf_parse_bin(pos); > > > > diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h > > @@ -498,6 +498,7 @@ struct hostapd_bss_config { > > + struct wpabuf *wps_application_ext[MAX_WPS_APPLICATION_EXTENSIONS]; > > Why would there be an array of these if the config parser is hardcoded > to only be able to configure one? It is an array by definition. Normally, (just like Vendor Extensions) Application Extensions in WPS Spec defined as multiple independent entries that are all separated by their own uuid. For now, due to the nature of config file, I made it possible to only configure the first one. I thought it could be extended in the future such as using other indexes for other configuration channels, or the config file could be extended to support multiple Application Extensions. For this commit, I only need one and I will use one. But it doesn't mean that would be a good and future-proof implementation. Please let me know if you prefer me to do such an implementation of config now: config.txt: wps_application_ext[0]=1058001804F3D0CE68BBE7408D450D3213E80BB80001010103007FC5 wps_application_ext[1]=1058001804WHATEVER ... wps_application_ext[n]=1058001804WHATEVERELSE I wanted to ask your preference because there is no such example of config usage right now. Regards. > > -- > Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap