Hi, 
 
I just finished my work in NM and have some proposals or uncertainties to 
share. They are mostly about encrypted ADHOC network. Authentication algorithms 
supported for ADHOC are just including WEP Open System, WPA TKIP and WPA AES. 
 
a) In the file nm-device-802-11- wireless.c,
(1)   In function supplicant_iface_scanned_ap_cb,
Sometime I can get an ap with flags=0x0 but wpa_flags=0x80. Is it right?
(2)   In function get_active_ap, 
When a fake ap is created, its BSSID is set to zero. So it can’t get through 
nm_ethernet_address_is_valid.
(3)   In function get_active_ap
The condition if((i == 0)…) will never be satisfied. When I changed to if((i == 
1)…), it still has some problems on finding the active ap. So I deleted (i == 
0) condition verdict at last.
(4)   In function merge_scanned_ap,
When cur_ap is fake, strict_match will be set as FALSE. If merge_ap is not 
encypted, it will never pass the check in function nm_ap_match_in_list. As 
result, merge_ap will be treated as a new ap every time when it is reported to 
NM. 
(5)   In function activation_success_handler,
When I am trying to test creating a new network, codes below will delete the 
network just created but not find a better match.
/*****************/  
tmp_ap = get_active_ap (self, ap, TRUE);
if (tmp_ap) {
       NMActRequest *req = nm_device_get_act_request (NM_DEVICE (self));
 
        /* Found a better match in the scan list than the fake AP.  Use it
         * instead.
         */
        nm_act_request_set_specific_object (req, nm_ap_get_dbus_path (tmp_ap));
 
        self->priv->ap_list = g_slist_remove (self->priv->ap_list, ap);
        g_object_unref (ap);
        ap = tmp_ap;
} 
/*****************/  
(6)   In function real_act_stage4_ip_config_timeout,
For an encrypted ADHOC network, when IP config is timeout, it should first 
consider it is ADHOC or it is encrypted?
When it first considers encryption, auto IP will never be called and creating 
or joining a network will be failed.  
b) In the file src / supplicant-manager / nm-supplicant-setting- verify.c
  “WPA-NONE” should be added to const array key_mgmt_allowed.
c) In the file libnm-util / nm-utils.c
For an ADHOC network encrypted with WPA, it can just support _SEC_GROUP_. So 
function nm_utils_security_valid needs to add codes below in the case 
NMU_SEC_WPA_PSK.
/*****************/  
  if(adhoc) {
if (   (ap_wpa & NM_802_11_AP_SEC_GROUP_TKIP)
               && (dev_caps & NM_802_11_DEVICE_CAP_ CIPHER_TKIP))
                 return TRUE;
if (   (ap_wpa & NM_802_11_AP_SEC_GROUP_CCMP)
               && (dev_caps & NM_802_11_DEVICE_CAP_ CIPHER_CCMP))
              return TRUE;
}
/*****************/  
d) In the file src / NetworkManagerAP.c,
   For an ADHOC network encrypted with WPA, WPA IE does not include KEY_MGMT. 
So we should set KEY_MGMT to PSK when know it is ADHOC.
e) In the file src / NetworkManagerAP.c
   In function nm_ap_new_fake_from_connection, when the network is encrypted 
with WEP, it could not get the pointer  s_wireless_sec->wep_key0 so mark the ap 
as not encypted. I have to use if(s_wireless->security) instead of 
if(s_wireless_sec->wep_key0). Changed code are as follows.
/*****************/  
#if 0         
if ( s_wireless_sec->wep_key0
    || s_wireless_sec->wep_key1
    || s_wireless_sec->wep_key2
    || s_wireless_sec->wep_key3)
nm_ap_set_flags (ap, flags | NM_802_11_AP_FLAGS_PRIVACY);
#else
if (s_wireless->security)
nm_ap_set_flags (ap, flags | NM_802_11_AP_FLAGS_PRIVACY);
#endif
/*****************/  
 
_________________________________________________________________
Make i'm yours.  Create a custom banner to support your cause.
http://im.live.com/Messenger/IM/Contribute/Default.aspx?source=TXT_TAGHM_MSN_Make_IM_Yours
_______________________________________________
NetworkManager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to