From d23aba6524863d311c4c60b861eb073ffd0f7dc9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 3 Jan 2006 19:00:09 +0000 Subject: [PATCH] 2006-01-03 Dan Williams * src/NetworkManagerAP.c - (nm_ap_add_capabilities_from_ie): presume no WEP unless the WPA IE specifies that WEP is supported * src/nm-device-802-11-wireless.c - (process_scan_results): don't mark an AP as supporting WEP if there's already other encryption capability info git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1256 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 10 ++++++++++ src/NetworkManagerAP.c | 4 ++++ src/nm-device-802-11-wireless.c | 8 +++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 15ea7a4c12..4590d37b99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-01-03 Dan Williams + + * src/NetworkManagerAP.c + - (nm_ap_add_capabilities_from_ie): presume no WEP unless + the WPA IE specifies that WEP is supported + + * src/nm-device-802-11-wireless.c + - (process_scan_results): don't mark an AP as supporting WEP + if there's already other encryption capability info + 2006-01-03 Dan Williams * src/dhcp-manager/nm-dhcp-manager.c diff --git a/src/NetworkManagerAP.c b/src/NetworkManagerAP.c index d542267296..0587089067 100644 --- a/src/NetworkManagerAP.c +++ b/src/NetworkManagerAP.c @@ -579,6 +579,10 @@ void nm_ap_add_capabilities_from_ie (NMAccessPoint *ap, const guint8 *wpa_ie, gu return; caps = nm_ap_get_capabilities (ap); + + /* Mark WEP as unsupported, if it's supported it will be added below */ + caps &= ~NM_802_11_CAP_PROTO_WEP; + if (cap_data->proto & IW_AUTH_WPA_VERSION_WPA) { caps |= NM_802_11_CAP_PROTO_WPA; diff --git a/src/nm-device-802-11-wireless.c b/src/nm-device-802-11-wireless.c index f9e5d01d85..13735a61df 100644 --- a/src/nm-device-802-11-wireless.c +++ b/src/nm-device-802-11-wireless.c @@ -2836,7 +2836,13 @@ process_scan_results (NMDevice80211Wireless *dev, break; case SIOCGIWENCODE: if (!(iwe->u.data.flags & IW_ENCODE_DISABLED)) - nm_ap_add_capabilities_for_wep (ap); + { + /* Only add WEP capabilities if this AP doesn't have + * any encryption capabilities yet. + */ + if (nm_ap_get_capabilities (ap) & NM_802_11_CAP_PROTO_NONE) + nm_ap_add_capabilities_for_wep (ap); + } break; #if 0 case SIOCGIWRATE: