From: Mathieu Olivari <math...@qca.qualcomm.com>

Setting wireless.@wifi-iface[N].ext_registrar=1 will enable UPNP
advertising and add an external registrar to the interface this vif
belongs to (br-lan if the vif is included in the LAN bridge). By
enabling this we append upnp_iface=xxx to the hostapd config file.

Signed-off-by: Sujith Manoharan <c_man...@qca.qualcomm.com>
Signed-off-by: Mathieu Olivari <math...@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcg...@qca.qualcomm.com>
---
 package/network/services/hostapd/files/hostapd.sh |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 56e6eb0..8e51fe7 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -207,6 +207,9 @@ hostapd_set_bss_options() {
                config_get manufacturer "$vif" wps_manufacturer "openwrt.org"
                config_get wps_pin "$vif" wps_pin "12345670"
 
+               config_get_bool ext_registrar "$vif" ext_registrar 0
+               [ "$ext_registrar" -gt 0 -a -n "$bridge" ] && append "$var" 
"upnp_iface=$bridge" "$N"
+
                append "$var" "eap_server=1" "$N"
                append "$var" "ap_pin=$wps_pin" "$N"
                append "$var" "wps_state=${wps_not_configured:-2}" "$N"
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to