diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-08-04 16:58:21 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-08-04 16:58:21 +0000 |
commit | e28c2df42bab5f97e2b0a554f2838693d3ce7085 (patch) | |
tree | ee342ccbcb9b4cd4d0de5119937e7ee07f5ae3ab /perl-install | |
parent | 3885151306bbe59064541c008e56574700493bb1 (diff) | |
download | drakx-e28c2df42bab5f97e2b0a554f2838693d3ce7085.tar drakx-e28c2df42bab5f97e2b0a554f2838693d3ce7085.tar.gz drakx-e28c2df42bab5f97e2b0a554f2838693d3ce7085.tar.bz2 drakx-e28c2df42bab5f97e2b0a554f2838693d3ce7085.tar.xz drakx-e28c2df42bab5f97e2b0a554f2838693d3ce7085.zip |
allow to use WEP keys in wpa_supplicant
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/netconnect.pm | 2 | ||||
-rw-r--r-- | perl-install/network/wireless.pm | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 227b5066c..153a31151 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1089,7 +1089,7 @@ set TxRate=0); } else { if ($wireless_enc_mode eq 'wpa-psk') { $ethntf->{WIRELESS_WPA_DRIVER} = network::wireless::wpa_supplicant_get_driver($module); - network::wireless::wpa_supplicant_add_network_simple($ethntf->{WIRELESS_ESSID}, $wireless_enc_key); + network::wireless::wpa_supplicant_add_network($ethntf->{WIRELESS_ESSID}, $wireless_enc_mode, $wireless_enc_key); } } network::wireless::wlan_ng_needed($module) and network::wireless::wlan_ng_configure($ethntf->{WIRELESS_ESSID}, $wireless_enc_key, $ethntf->{DEVICE}, $module); diff --git a/perl-install/network/wireless.pm b/perl-install/network/wireless.pm index 4e11d1124..f509cd949 100644 --- a/perl-install/network/wireless.pm +++ b/perl-install/network/wireless.pm @@ -96,13 +96,24 @@ sub wpa_supplicant_get_driver { "wext"; } -sub wpa_supplicant_add_network_simple { - my ($essid, $key) = @_; +sub wpa_supplicant_add_network { + my ($essid, $enc_mode, $key) = @_; my $conf = wpa_supplicant_read_conf(); push @$conf, { ssid => qq("$essid"), - psk => convert_key_for_wpa_supplicant($key), scan_ssid => 1, + $enc_mode eq 'wpa-psk' ? + ( + psk => convert_key_for_wpa_supplicant($key), + ) : + member($enc_mode, qw(open restricted)) ? + ( + key_mgmt => 'NONE', + wep_key0 => convert_key_for_wpa_supplicant($key), + wep_tx_keyidx => 0, + auth_alg => 'SHARED', + ) : + () }; wpa_supplicant_write_conf($conf); } |