summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-08-24 13:51:49 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-08-24 13:51:49 +0000
commit0e88acfd4ef3abd5af048fda14810a207681c913 (patch)
tree1b55ff0581e494a5620af0d014a2897092b6600c
parent335e519dd64bbc8b0c938945745a92d86c2ff9fc (diff)
libs/iwinfo: ignore proprietary ciphers or auth suites - we can't handle them anyway
-rw-r--r--libs/iwinfo/src/iwinfo_lualib.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/libs/iwinfo/src/iwinfo_lualib.c b/libs/iwinfo/src/iwinfo_lualib.c
index d9c82b1ec9..0bd2fa59ab 100644
--- a/libs/iwinfo/src/iwinfo_lualib.c
+++ b/libs/iwinfo/src/iwinfo_lualib.c
@@ -158,39 +158,33 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
lua_setfield(L, -2, "wep");
lua_newtable(L);
- for( j = 0, y = 1; j < 8; j++ )
+ for( j = 0, y = 1; j < IW_IE_CYPHER_NUM; j++ )
{
if( e->crypto.group_ciphers & (1<<j) )
{
- lua_pushstring(L, (j < IW_IE_CYPHER_NUM)
- ? iw_ie_cypher_name[j] : "Proprietary");
-
+ lua_pushstring(L, iw_ie_cypher_name[j]);
lua_rawseti(L, -2, y++);
}
}
lua_setfield(L, -2, "group_ciphers");
lua_newtable(L);
- for( j = 0, y = 1; j < 8; j++ )
+ for( j = 0, y = 1; j < IW_IE_CYPHER_NUM; j++ )
{
if( e->crypto.pair_ciphers & (1<<j) )
{
- lua_pushstring(L, (j < IW_IE_CYPHER_NUM)
- ? iw_ie_cypher_name[j] : "Proprietary");
-
+ lua_pushstring(L, iw_ie_cypher_name[j]);
lua_rawseti(L, -2, y++);
}
}
lua_setfield(L, -2, "pair_ciphers");
lua_newtable(L);
- for( j = 0, y = 1; j < 8; j++ )
+ for( j = 0, y = 1; j < IW_IE_KEY_MGMT_NUM; j++ )
{
if( e->crypto.auth_suites & (1<<j) )
{
- lua_pushstring(L, (j < IW_IE_KEY_MGMT_NUM)
- ? iw_ie_key_mgmt_name[j] : "Proprietary");
-
+ lua_pushstring(L, iw_ie_key_mgmt_name[j]);
lua_rawseti(L, -2, y++);
}
}