Bug 115342 - atheros cards broken (ifup-wireless generates bad iwconfig lines)
Summary: atheros cards broken (ifup-wireless generates bad iwconfig lines)
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Network (show other bugs)
Version: Beta 3
Hardware: Other All
: P5 - None : Major
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-05 23:59 UTC by Dan Winship
Modified: 2005-09-06 08:43 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Winship 2005-09-05 23:59:58 UTC
/etc/sysconfig/network/scripts/ifup-wireless generates invalid iwconfig lines,
at least for atheros cards:

spellbook:/etc/sysconfig/network/scripts # ifup ath0
    ath0      device: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01))
    ath0      configuration: wlan-id-00:05:4e:4b:ed:df
command 'iwconfig ath0 key open a59blahblahblahblahblah [1] key 128 [2] key 128
[3] key 128 [4]' returned
 Error for wireless request "Set Encode" (8B2A) :
    SET failed on device ath0 ; Invalid argument.
setting encryption key FAILED, aborting interface setup


The problem is the call to print_key at (or around) line 239:

   eval WIRELESS_KEY_$i="$(print_key $K $WIRELESS_KEY_LENGTH)"

if $K is empty/unset, then this is equivalent to

   eval WIRELESS_KEY_$i="$(print_key  $WIRELESS_KEY_LENGTH)"

meaning the $WIRELESS_KEY_LENGTH (128) is incorrectly interpreted as a
key (and the key length is defaulted by print_key), resulting in spurious
invalid keys in the iwconfig command.

Changing the line to

   eval WIRELESS_KEY_$i=$(print_key "$K" $WIRELESS_KEY_LENGTH)

fixes it, and I think should not cause any other problems, but I didn't
look carefully, so that might not be quite right.
Comment 1 Joachim Gleissner 2005-09-06 08:43:26 UTC
Is already fixed.