After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672501 - Make available a lock to BSSID, by identifying already used BSSIDs
Make available a lock to BSSID, by identifying already used BSSIDs
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-connection-editor
0.9.x
Other Linux
: Normal enhancement
: ---
Assigned To: Jiri Klimes
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-03-20 21:24 UTC by Javier Domingo
Modified: 2012-10-16 13:57 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
Add drop-down list with previously seen APs to 'BSSID' entry (7.40 KB, patch)
2012-08-30 11:18 UTC, Jiri Klimes
none Details | Review
settings: fill seen-bssids for GetSettings() (4.08 KB, patch)
2012-08-30 11:23 UTC, Jiri Klimes
none Details | Review
libnm-util: change seen-bssids property description (2.61 KB, patch)
2012-08-30 11:25 UTC, Jiri Klimes
needs-work Details | Review
settings: fill seen-bssids for GetSettings() (3.83 KB, patch)
2012-10-11 14:42 UTC, Jiri Klimes
accepted-commit_now Details | Review
Add drop-down list with previously seen APs to 'BSSID' entry (7.38 KB, patch)
2012-10-11 14:46 UTC, Jiri Klimes
accepted-commit_now Details | Review

Description Javier Domingo 2012-03-20 21:24:50 UTC
I think it is self explainatory, to be able to select from a list in the BSSID field which is the AP you want to get connected to, as we don't usually know which is the MAC address of the AP.

https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/711989
Comment 1 Pavel Simerda 2012-07-26 12:44:39 UTC
I don't think you can get a list of previous BSSIDs but locking to the current one would be a nice feature.
Comment 2 Jiri Klimes 2012-08-30 11:10:52 UTC
Actually, we do have a list of seen BBSIDs for particular connections, NetworkManager daemon handles that. We just have to return the list in GetSecrets() so that it is available in 802-11-wireless' seen-bssids property.
Comment 3 Javier Domingo 2012-08-30 11:13:08 UTC
Good to know it, so when can be this achieved?
Comment 4 Jiri Klimes 2012-08-30 11:18:39 UTC
Created attachment 222923 [details] [review]
Add drop-down list with previously seen APs to 'BSSID' entry

The patch changes 'BSSID' entry in Wi-Fi page into a combobox with an entry.
The combobox is pre-populated with previously seen BSSIDs for the connection so that the user can simply select the AP he wants. If an AP is missing, it is still possible to write a BSSID down in the entry box.
Comment 5 Jiri Klimes 2012-08-30 11:23:00 UTC
Created attachment 222924 [details] [review]
settings: fill seen-bssids for GetSettings()

In order we can reach BSSID list from clients, we need to return that in GetSettings() (seen-bssids is not populated automatically in order not to force changes in /etc)
Comment 6 Jiri Klimes 2012-08-30 11:25:20 UTC
Created attachment 222925 [details] [review]
libnm-util: change seen-bssids property description

Change 'seen-bssids' description removing note that it is not much useful, and adding a note that it is read-only.
Comment 7 Jiri Klimes 2012-10-11 14:42:51 UTC
Created attachment 226267 [details] [review]
settings: fill seen-bssids for GetSettings()

In order we can reach BSSID list from clients, we need to return that in
GetSettings() (seen-bssids is not populated automatically in order not to force
changes in /etc)

Updated to apply cleanly to master.
Comment 8 Jiri Klimes 2012-10-11 14:46:35 UTC
Created attachment 226268 [details] [review]
Add drop-down list with previously seen APs to 'BSSID' entry

The patch changes 'BSSID' entry in Wi-Fi page into a combobox with an entry.
The combobox is pre-populated with previously seen BSSIDs for the connection so
that the user can simply select the AP he wants. If an AP is missing, it is
still possible to write a BSSID down in the entry box.

Updated to apply cleanly to master and simplified (the same way MAC is handled).
Comment 9 Dan Winship 2012-10-12 17:24:03 UTC
Comment on attachment 226267 [details] [review]
settings: fill seen-bssids for GetSettings()

looks good. The only thing I'd say is:

>+	while (g_hash_table_iter_next (&iter, NULL, (gpointer) &bssid_str))
>+		bssid_list = g_slist_append (bssid_list, g_strdup (bssid_str));

When the order doesn't matter, we generally use g_slist_prepend(), so the operation as a whole is O(n) rather than O(n^2).
Comment 10 Dan Winship 2012-10-12 17:25:41 UTC
Comment on attachment 226268 [details] [review]
Add drop-down list with previously seen APs to 'BSSID' entry

looks good. mostly cut+paste+search+replace anyway
Comment 11 Dan Winship 2012-10-12 17:27:54 UTC
Comment on attachment 222925 [details] [review]
libnm-util: change seen-bssids property description

>+	 * NetworkManager internally tracks previously seen BSSIDs. This property
>+	 * is read-only and reflects the list of NetworkManager.

>+		                             G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));

So, it's not really read-only, and there's still nm_setting_wireless_add_seen_bssid() too. I guess it would be more correct to say "changes you make to this property will not be preserved", and put a similar note on nm_setting_wireless_add_seen_bssid().
Comment 12 Jiri Klimes 2012-10-16 13:57:01 UTC
Thanks for reviewing, patches changed accordingly and committed,
NM:
65029e0f894e8f56d420b1b0c816c94ddcef5671
347e149e398278b1f7c416d6a5998861667ce22b

applet:
bc0f95bad6d6e0faabf3efa0e3eb841547033bae

(In reply to comment #9)
> (From update of attachment 226267 [details] [review])
> looks good. The only thing I'd say is:
> 
> >+	while (g_hash_table_iter_next (&iter, NULL, (gpointer) &bssid_str))
> >+		bssid_list = g_slist_append (bssid_list, g_strdup (bssid_str));
> 
> When the order doesn't matter, we generally use g_slist_prepend(), so the
> operation as a whole is O(n) rather than O(n^2).

Yeah, we probably doesn't care about the order much, so changing to reverse() to save some watts :-)

(In reply to comment #11)
> (From update of attachment 222925 [details] [review])
> >+	 * NetworkManager internally tracks previously seen BSSIDs. This property
> >+	 * is read-only and reflects the list of NetworkManager.
> 
> >+		                             G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
> 
> So, it's not really read-only, and there's still
> nm_setting_wireless_add_seen_bssid() too. I guess it would be more correct to
> say "changes you make to this property will not be preserved", and put a
> similar note on nm_setting_wireless_add_seen_bssid().

Description adjusted.