2007-10-09 Dan Williams <dcbw@redhat.com>

* src/nm-device-802-11-wireless.c
		- (supplicant_iface_scanned_ap_cb): set the non-broadcast flag elsewhere
		- (merge_scanned_ap): only have the manager fill the SSID if the AP
			isn't broadcasting its SSID; set the non-broadcast flag here; fix
			merging of non-SSID-broadcasting APs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2962 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2007-10-09 20:28:16 +00:00
parent 83bd445e2e
commit a29316d81b
2 changed files with 29 additions and 14 deletions

View file

@ -1,3 +1,11 @@
2007-10-09 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
- (supplicant_iface_scanned_ap_cb): set the non-broadcast flag elsewhere
- (merge_scanned_ap): only have the manager fill the SSID if the AP
isn't broadcasting its SSID; set the non-broadcast flag here; fix
merging of non-SSID-broadcasting APs
2007-10-09 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-utils.c (nm_utils_is_empty_ssid): Convert the ssid type to

View file

@ -1618,9 +1618,21 @@ merge_scanned_ap (NMDevice80211Wireless *self,
{
GSList * elt;
NMAccessPoint * found_ap = NULL;
const GByteArray *ssid;
/* Allow the manager to fill in the SSID if possible */
g_signal_emit (self, signals[HIDDEN_AP_FOUND], 0, merge_ap);
/* Let the manager try to fill in the SSID from seen-bssids lists
* if it can
*/
ssid = nm_ap_get_ssid (merge_ap);
if (!ssid || !ssid->len)
g_signal_emit (self, signals[HIDDEN_AP_FOUND], 0, merge_ap);
/* If the AP is not broadcasting its SSID and matching the SSID with a
* seen-bssids entry failed, mark the AP as non-broadcasting
*/
ssid = nm_ap_get_ssid (merge_ap);
if (!ssid || !ssid->len)
nm_ap_set_broadcast (merge_ap, FALSE);
for (elt = self->priv->ap_list; elt; elt = g_slist_next (elt)) {
NMAccessPoint * list_ap = NM_AP (elt->data);
@ -1634,9 +1646,11 @@ merge_scanned_ap (NMDevice80211Wireless *self,
int merge_mode = nm_ap_get_mode (merge_ap);
double merge_freq = nm_ap_get_freq (merge_ap);
/* SSID match */
if ( !list_ssid
|| !merge_ssid
/* SSID match; if both APs are hiding their SSIDs,
* let matching continue on BSSID and other properties
*/
if ( (!list_ssid && merge_ssid)
|| (list_ssid && !merge_ssid)
|| !nm_utils_same_ssid (list_ssid, merge_ssid, TRUE))
continue;
@ -1656,6 +1670,8 @@ merge_scanned_ap (NMDevice80211Wireless *self,
if ((int) list_freq != (int) merge_freq)
continue;
// FIXME: make sure WPA AP doesn't get matched with WEP by taking
// flags into AP account
found_ap = list_ap;
break;
}
@ -1782,15 +1798,6 @@ supplicant_iface_scanned_ap_cb (NMSupplicantInterface * iface,
set_ap_strength_from_properties (self, ap, properties);
/* If the AP is not broadcasting its SSID, try to fill it in here from our
* allowed list where we cache known MAC->SSID associations.
*/
if (!nm_ap_get_ssid (ap)) {
nm_ap_set_broadcast (ap, FALSE);
// FIXME: get the saved BSSID from NMConnection/NMSettings
// nm_ap_list_copy_one_ssid_by_address (ap, app_data->allowed_ap_list);
}
/* Add the AP to the device's AP list */
merge_scanned_ap (self, ap);