[PC-BSD Commits] r7145 - in pcbsd: current/pcbsd-netmanager/src/wificonfig stable/pcbsd-netmanager/src/wificonfig

svn at pcbsd.org svn at pcbsd.org
Thu Jul 8 07:58:41 PDT 2010


Author: kris
Date: 2010-07-08 07:58:41 -0700 (Thu, 08 Jul 2010)
New Revision: 7145

Modified:
   pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
   pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
Log:

Put check in place to ensure we have valid wepkeyindex at all times



Modified: pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2010-07-08 12:52:57 UTC (rev 7144)
+++ pcbsd/current/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2010-07-08 14:58:41 UTC (rev 7145)
@@ -189,6 +189,9 @@
        {
           streamout << " key_mgmt=NONE\n";
        } else if (SSIDEncType[curItem] == WEP_ENCRYPTION ) {
+	  // Ensure we don't end up with invalid key index
+	  if ( WEPIndex[curItem] !=0 && WEPIndex[curItem] !=1 && WEPIndex[curItem] !=2 && WEPIndex[curItem] !=3 )
+		WEPIndex[curItem] = 0;
           
           streamout << " key_mgmt=NONE\n";
           streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex[curItem]) + "\n";

Modified: pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2010-07-08 12:52:57 UTC (rev 7144)
+++ pcbsd/stable/pcbsd-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2010-07-08 14:58:41 UTC (rev 7145)
@@ -189,6 +189,9 @@
        {
           streamout << " key_mgmt=NONE\n";
        } else if (SSIDEncType[curItem] == WEP_ENCRYPTION ) {
+	  // Ensure we don't end up with invalid key index
+	  if ( WEPIndex[curItem] !=0 && WEPIndex[curItem] !=1 && WEPIndex[curItem] !=2 && WEPIndex[curItem] !=3 )
+		WEPIndex[curItem] = 0;
           
           streamout << " key_mgmt=NONE\n";
           streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex[curItem]) + "\n";



More information about the Commits mailing list