mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-21 01:15:42 +02:00
hotspot-to-wpa: support ignoring specific hotspot
This commit is contained in:
parent
df0d826999
commit
c1fa0f3579
2 changed files with 5 additions and 0 deletions
|
@ -56,6 +56,7 @@ Create hotspot login credentials:
|
|||
|
||||
Additionally templates can be created to give more options for access list:
|
||||
|
||||
* `action`: set to `reject` to ignore logins on that hotspot
|
||||
* `private-passphrase`: do **not** use passphrase from hotspot's user
|
||||
credentials, but given one - or unset (use default passphrase) with
|
||||
special word `ignore`
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
:local Template [ / caps-man access-list get ([ find where disabled \
|
||||
comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ];
|
||||
|
||||
:if ($Template->"action" = "reject") do={
|
||||
$LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true;
|
||||
}
|
||||
|
||||
:if ([ :len [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ] ] = 0) do={
|
||||
/ caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled=yes;
|
||||
$LogPrintExit2 warning $0 ("Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'.") false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue