Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158319 - iwconfig.sh does not check 'Encryption key:' correctly and shows incorrect WEP status
Summary: iwconfig.sh does not check 'Encryption key:' correctly and shows incorrect WE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-16 13:50 UTC by Robert Wolf
Modified: 2006-12-19 09:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Wolf 2006-12-16 13:50:02 UTC
Hi,

I have iwconfig  Wireless-Tools version 28 and it reports my wifi card this way:

----------------------------------------------------------------------
wlan0     802.11b/g NIC  ESSID:"MyEssid"  
          Mode:Master  Frequency=2.417 GHz  Access Point: 00:4F:66:00:26:CA   
          Bit Rate:1 Mb/s   
          Retry:off   RTS thr=2432 B   Fragment thr:off
          Encryption key:****-****-** [2]   Security mode:open
          Power Management:off
          Link Quality=28/100  Signal level=-120 dBm  Noise level=-256 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:88
          Tx excessive retries:61689  Invalid misc:0   Missed beacon:0
----------------------------------------------------------------------

While starting with /etc/init.d/net.wlan0 it reports

 * Starting wlan0
 *   Configuring wireless network for wlan0
 *     wlan0 configured as ESSID "HomeFlowAp"
 *     in master mode on channel 2 (WEP disabled)
 *   Bringing up wlan0
 *     192.168.123.1                                    [ ok ]

The problem is with '(WEP disabled)' statement if my Encryption key is entered.

I found the problem in /lib/rcscripts/net/iwconfig.sh file. There is following code on line 77:

----------------------------------------------------------------------
if iwconfig "$1" | grep -qE "^ +Encryption key:[0-9,A-F]" ; then
----------------------------------------------------------------------

But my version of iwconfig shows

----------------------------------------------------------------------
          Encryption key:****-****-** [2]   Security mode:open
----------------------------------------------------------------------

You can see, there are asterisks instead of [0-9,A-F]. And the line starts with TAB instead of spaces. When I change the grep regexp, it works fine for me. I changed the code to

----------------------------------------------------------------------
if iwconfig "$1" | grep -qE "^[[:space:]]+Encryption key:[*0-9,A-F]" ; then
----------------------------------------------------------------------

Could you please update the grep regexp in this file?

Thank you.

Robert Wolf.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-12-19 09:29:23 UTC
Fixed in 1.12.8 - thanks