mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
hotspot-to-wpa: reject for two seconds...
... to make the device send a new DHCP request after.
This commit is contained in:
parent
f8a2b88692
commit
0c8bc60648
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,8 @@ $LogPrintExit2 info $0 ("Adding/updating access-list entry for mac address " . $
|
||||||
" (user " . $UserName . ").") false;
|
" (user " . $UserName . ").") false;
|
||||||
/caps-man/access-list/remove [ find where mac-address=$MacAddress comment~"^hotspot-to-wpa: " ];
|
/caps-man/access-list/remove [ find where mac-address=$MacAddress comment~"^hotspot-to-wpa: " ];
|
||||||
/caps-man/access-list/add comment=("hotspot-to-wpa: " . $UserName . ", " . $MacAddress . ", " . $Date) \
|
/caps-man/access-list/add comment=("hotspot-to-wpa: " . $UserName . ", " . $MacAddress . ", " . $Date) \
|
||||||
mac-address=$MacAddress private-passphrase=($UserVal->"password") ssid-regexp="-wpa\$" place-before=$PlaceBefore;
|
mac-address=$MacAddress private-passphrase=($UserVal->"password") ssid-regexp="-wpa\$" \
|
||||||
|
action=reject place-before=$PlaceBefore;
|
||||||
|
|
||||||
:local Entry [ /caps-man/access-list/find where mac-address=$MacAddress \
|
:local Entry [ /caps-man/access-list/find where mac-address=$MacAddress \
|
||||||
comment=("hotspot-to-wpa: " . $UserName . ", " . $MacAddress . ", " . $Date) ];
|
comment=("hotspot-to-wpa: " . $UserName . ", " . $MacAddress . ", " . $Date) ];
|
||||||
|
@ -81,3 +82,6 @@ $LogPrintExit2 info $0 ("Adding/updating access-list entry for mac address " . $
|
||||||
:if ([ :len $VlanMode] > 0) do={
|
:if ([ :len $VlanMode] > 0) do={
|
||||||
/caps-man/access-list/set $Entry vlan-mode=$VlanMode;
|
/caps-man/access-list/set $Entry vlan-mode=$VlanMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:delay 2s;
|
||||||
|
/caps-man/access-list/set $Entry action=accept;
|
||||||
|
|
Loading…
Reference in a new issue