public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] hostapd: make client isolation configurable via WebUI
@ 2019-03-16 14:20 Peter Müller
  2019-03-18 12:33 ` Michael Tremer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Müller @ 2019-03-16 14:20 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 2690 bytes --]

hostapd supports client-isolation, but this feature could
not be configured via the WebUI so far. Since it might be
desired in public wireless networks, or even private ones,
it makes sense to provide a radio button to let the user
decide on.

Fixes #11974.

Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
---
 html/cgi-bin/wlanap.cgi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi
index 72c9a1298..cae191101 100644
--- a/html/cgi-bin/wlanap.cgi
+++ b/html/cgi-bin/wlanap.cgi
@@ -75,6 +75,7 @@ $wlanapsettings{'DRIVER'} = 'NL80211';
 $wlanapsettings{'HTCAPS'} = '';
 $wlanapsettings{'VHTCAPS'} = '';
 $wlanapsettings{'NOSCAN'} = 'off';
+$wlanapsettings{'CLIENTISOLATION'} = 'off';
 
 &General::readhash("/var/ipfire/wlanap/settings", \%wlanapsettings);
 &Header::getcgihash(\%wlanapsettings);
@@ -252,6 +253,10 @@ $checked{'NOSCAN'}{'off'} = '';
 $checked{'NOSCAN'}{'on'} = '';
 $checked{'NOSCAN'}{$wlanapsettings{'NOSCAN'}} = "checked='checked'";
 
+$checked{'CLIENTISOLATION'}{'off'} = '';
+$checked{'CLIENTISOLATION'}{'on'} = '';
+$checked{'CLIENTISOLATION'}{$wlanapsettings{'CLIENTISOLATION'}} = "checked='checked'";
+
 $selected{'ENC'}{$wlanapsettings{'ENC'}} = "selected='selected'";
 $selected{'CHANNEL'}{$wlanapsettings{'CHANNEL'}} = "selected='selected'";
 $selected{'COUNTRY'}{$wlanapsettings{'COUNTRY'}} = "selected='selected'";
@@ -377,6 +382,7 @@ print <<END
 <tr><td width='25%' class='base'>SSID:&nbsp;</td><td class='base' colspan='3'><input type='text' name='SSID' size='30' value='$wlanapsettings{'SSID'}' /></td></tr>
 <!--SSID Broadcast: on => HIDESSID: off -->
 <tr><td width='25%' class='base'>SSID Broadcast:&nbsp;</td><td class='base' colspan='3'>on <input type='radio' name='HIDESSID' value='off' $checked{'HIDESSID'}{'off'} /> | <input type='radio' name='HIDESSID' value='on' $checked{'HIDESSID'}{'on'} /> off</td></tr>
+<tr><td width='25%' class='base'>Client Isolation:&nbsp;</td><td class='base' colspan='3'>on <input type='radio' name='CLIENTISOLATION' value='off' $checked{'CLIENTISOLATION'}{'off'} /> | <input type='radio' name='CLIENTISOLATION' value='on' $checked{'CLIENTISOLATION'}{'on'} /> off</td></tr>
 
 
 <tr><td width='25%' class='base'>$Lang::tr{'wlanap country'}:&nbsp;</td><td class='base' colspan='3'>
@@ -632,6 +638,14 @@ END
 
  }
 
+ # https://forum.ipfire.org/viewtopic.php?f=22&t=12274&p=79070#p79070
+ if ( $wlanapsettings{'CLIENTISOLATION'} eq 'on' ){
+	print CONFIGFILE <<END
+ap_isolate=1
+END
+;
+ }
+
  if ( $wlanapsettings{'NOSCAN'} eq 'on' ){
 	print CONFIGFILE <<END
 noscan=1
-- 
2.16.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-18 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-16 14:20 [PATCH] hostapd: make client isolation configurable via WebUI Peter Müller
2019-03-18 12:33 ` Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox