lua: Check BSSMAP msgtypes in one function..
This commit is contained in:
parent
8bde2ee61f
commit
def777ae7e
|
@ -25,30 +25,22 @@ do
|
||||||
function check_failure(con)
|
function check_failure(con)
|
||||||
check_lu_reject(con)
|
check_lu_reject(con)
|
||||||
check_disconnect(con)
|
check_disconnect(con)
|
||||||
check_ass_failure(con)
|
check_failures(con)
|
||||||
check_cipher_reject(con)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- cipher mode reject
|
-- cipher mode reject
|
||||||
function check_cipher_reject(con)
|
function check_failures(con)
|
||||||
local msgtype = bssmap_msgtype_field()
|
local msgtype = bssmap_msgtype_field()
|
||||||
if not msgtype then
|
if not msgtype then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if tonumber(msgtype) == 89 then
|
msgtype = tonumber(msgtype)
|
||||||
|
if msgtype == 89 then
|
||||||
|
print("Cipher mode reject")
|
||||||
con[4] = true
|
con[4] = true
|
||||||
end
|
elseif msgtype == 0x03 then
|
||||||
end
|
print("Assignment failure")
|
||||||
|
|
||||||
-- check assignment failures
|
|
||||||
function check_ass_failure(con)
|
|
||||||
local msgtype = bssmap_msgtype_field()
|
|
||||||
if not msgtype then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if tonumber(msgtype) == 0x03 then
|
|
||||||
con[4] = true
|
con[4] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue