summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-02 18:01:16 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-02 18:01:16 +0000
commit6a9f77996379c9ac98ccf9f553253cddbc9febae (patch)
treede26372b189755f7a92fb76870e546828a51e5fc
parentd901ac9ce14b64138a8dbaa5128e7204a9c0e366 (diff)
downloaddrakx-net-6a9f77996379c9ac98ccf9f553253cddbc9febae.tar
drakx-net-6a9f77996379c9ac98ccf9f553253cddbc9febae.tar.gz
drakx-net-6a9f77996379c9ac98ccf9f553253cddbc9febae.tar.bz2
drakx-net-6a9f77996379c9ac98ccf9f553253cddbc9febae.tar.xz
drakx-net-6a9f77996379c9ac98ccf9f553253cddbc9febae.zip
write bssid in wpa_supplicant.conf for hidden networks (helps getting network ids of hidden networks)
-rw-r--r--lib/network/connection/wireless.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 6b45d88..61217dc 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -389,6 +389,7 @@ sub guess_network_access_settings {
$self->{ifcfg};
$ifcfg ||= {};
+ $self->{access}{network}{bssid} = $network && $network->{hidden} && $network->{ap};
$self->{access}{network}{essid} = $network && $network->{essid} || $ifcfg->{WIRELESS_ESSID} || !$network && "any";
($self->{access}{network}{key}, my $restricted, $self->{access}{network}{force_ascii_key}) =
get_wep_key_from_iwconfig($ifcfg->{WIRELESS_ENC_KEY});
@@ -659,7 +660,7 @@ sub add_nework_to_wpa_supplicant {
if ($self->{access}{network}{encryption} eq 'wpa-eap') {
wpa_supplicant_add_eap_network($self->{access}{network});
} else {
- wpa_supplicant_add_network($self->{access}{network}{essid}, $self->{access}{network}{encryption}, $self->{access}{network}{key}, $self->{access}{network}{force_ascii_key}, $self->{access}{network}{mode});
+ wpa_supplicant_add_network($self->{access}{network}{essid}, $self->{access}{network}{bssid}, $self->{access}{network}{encryption}, $self->{access}{network}{key}, $self->{access}{network}{force_ascii_key}, $self->{access}{network}{mode});
}
}
@@ -858,11 +859,12 @@ sub wpa_supplicant_get_driver {
}
sub wpa_supplicant_add_network {
- my ($essid, $enc_mode, $key, $force_ascii, $mode) = @_;
+ my ($essid, $bssid, $enc_mode, $key, $force_ascii, $mode) = @_;
my $conf = wpa_supplicant_read_conf();
my $network = {
ssid => qq("$essid"),
scan_ssid => 1,
+ if_($bssid, bssid => $bssid),
};
if ($enc_mode eq 'wpa-psk') {