* src/nm-activation-request.c
- (get_secrets_cb): handle getting a setting back that is more than
just secrets (ie, user changed auth or EAP method or something)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (real_act_stage2_config): after the first association failure,
if the connection still needs secrets ask the user for them
explicitly. After the fourth association failure due to bad
secrets, fail the connection entirely. Handles the GetSecrets
loop that NM gets into when the provided secrets don't match up
with the connection details.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3008 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-config.c
- (nm_supplicant_config_add_setting_wireless_security): only add
WPA-specific options when WPA is in use
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3007 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-config.c
- (nm_supplicant_config_add_setting_wireless_security): 'password'
secret doesn't need to be unhexified
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3006 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement support for static IP addresses, additional/overridden
DNS and
DNS domain search lists.
* libnm-util/nm-setting.c (uint_array_to_gvalue): Implement.
(ip4_addresses_to_gvalue): Implement.
(convert_array_to_byte_array): Implement.
(nm_setting_populate_from_hash_default): Handle
NM_S_TYPE_UINT_ARRAY and
NM_S_TYPE_IP4_ADDRESSES.
(nm_setting_hash): Ditto.
(default_setting_clear_secrets): Add a default case for the
switch: IP address
shouldn't be secret, ever.
(setting_ip4_config_verify): Update, requires addresses in case
of manual
configurations.
(setting_ip4_config_destroy): Free stuff.
* src/nm-device.c (merge_ip4_config): Implement.
(real_act_stage4_get_ip4_config): Merge IP4 configuration from
NMConnection.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2996 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAP.c
src/NetworkManagerAP.h
- Rename 'articifical' -> 'fake' since that's what they are until
noticed in scans
- (nm_ap_new_fake_from_connection): new function to create a 'fake' AP
from the attributes in an NMConnection object
- (security_compatible): better handle Dynamic WEP and LEAP; handle
WPA Enterprise
- (nm_ap_match_in_list): find a matching AP in a scan list
* src/nm-device-802-11-wireless.c
- (get_active_ap): add an 'ignore_ap' argument to ignore a specific
AP when searching the scan list; match on frequency and mode too
- (nm_device_802_11_wireless_get_frequency): implement
- (merge_scanned_ap): replace duplicate matching logic with
nm_ap_match_in_list()
- (real_act_stage1_prepare): handle a NULL specific object; ie where
the user is trying to connect to a hidden network that is not yet
known from the scan list
- (activation_success_handler): now that the card knows the AP's BSSID,
there may already be a scanned AP in the scan list that is what
we really wanted to connect to, but didn't know at the time. Use
that instead of the 'fake' AP created at activation start and get
rid of the 'fake' AP
- (cull_scan_list): don't remove fake APs
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2993 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-activation-request.h
src/nm-activation-request.c
- (nm_act_request_set_specific_object): new function; allow setting the
specific object if one isn't set yet
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2991 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-config.h
src/supplicant-manager/nm-supplicant-config.c
- (nm_supplicant_config_init, nm_supplicant_config_finalize): add a hash
table to store blobs
- (nm_supplicant_config_add_blob): new function; add blob to internal
blob hash table
- (nm_supplicant_config_get_blobs): new function; get stored blobs
- (nm_supplicant_config_add_setting_wireless_security): handle
options that use certificates (ie, blobs)
* src/nm-device-802-11-wireless.c
- (build_supplicant_config): pass a UID (just use the connection path)
to the supplicant config as now required
* src/supplicant-manager/nm-supplicant-interface.c
- (add_network_cb, call_set_blobs, set_blobs_cb, call_set_network): if
there are any blobs to send to wpa_supplicant, send those first
before sending the network configuration
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2990 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Split the GetSecrets() call off to a separate D-Bus interface so that it
can be more easily locked down with D-Bus policy. Only 'root' (ie, NM)
should be able to call GetSecrets().
* include/NetworkManager.h
- Define the connection secrets D-Bus interface
* src/vpn-manager/nm-vpn-connection.c
- (clear_need_auth): get the right proxy object for the connection
secrets interface
- (get_connection_secrets): use the connection secrets proxy; send
empty hints in get secrets request
* src/nm-activation-request.c
- (nm_act_request_request_connection_secrets): use the connection
secrets proxy; send empty hints in get secrets request
* src/nm-manager.c
src/nm-manager.h
- (connection_get_settings_cb): set the connection secrets proxy on
the connection object too
- (internal_new_connection_cb): create the connection secrets proxy
* introspection/nm-settings-connection.xml
- Define Connection.Secrets interface and move GetSecrets there
- Add a 'hints' argument to GetSecrets
* libnm-glib/nm-settings.c
libnm-glib/nm-settings.h
- (impl_connection_settings_get_secrets): add 'hints' argument
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2989 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
- (manager_set_wireless_enabled): don't allow wireless to be enabled
if it's disabled in hardware; don't touch network devices while
NM is asleep
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2980 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-client.c
- (nm_client_activate_device): convert NULL specific_object to "/",
which is used in place of NULL
* src/nm-manager.c
- (impl_manager_activate_device): convert "/" specific_object back into
NULL
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2979 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement a generic NMSetting creator from setting name.
While at it, get rid of all nm_setting_foo_new_from_hash()
functions and
add a virtual function 'populate_fn'.
* libnm-util/nm-connection.c (nm_connection_create_setting):
* Implement.
(register_default_creators): Register setting creators instead
of functions
that create and then populate.
(parse_one_setting): Use the common setting creator and then
setting specific
poplulation function.
* libnm-util/nm-setting.c: Get rid of
* nm_setting_foo_new_from_hash() functions,
they all looked exactly the same.
Add a 'populate_fn' virtual function to NMSetting.
Use default virtual functions in case they are not overriden.
(nm_setting_populate_from_hash): Implement.
* src/nm-device.c (real_act_stage3_ip_config_start): Don't hard
* code the setting
name, use a defined string.
(real_act_stage4_get_ip4_config): Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2978 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement killswitch polling through HAL.
* src/nm-manager.c: Add wireless hardware status property. Add
'properties-changed' signal for changes in wireless and wireless
hardware
state changes.
* src/nm-hal-manager.c: Poll hal for killswitch statuses in
* every 6 seconds
and update NMManager's wireless hardware state when it has
changed.
(nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
already does that.
* libnm-glib/nm-client.c: Add wireless hardware status property.
* Cache the
values of wireless state and wireless hardware state. Listen for
the
'properties-changed' signals, update the cached values and emit
notify.
* include/NetworkManager.h: Fix a typo in a comment.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting.h
libnm-util/nm-setting.c
src/supplicant-manager/nm-supplicant-config.c
- Make the 'proto' field of the 802-11-wireless-security field a
string list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2973 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Rework the "properties-changed" signal implementation.
In classes that need to use it, just emit "GObject::notify" and
the new
framework takes care of the rest to make the signal available on
dbus.
The framework queues the notifications and tries to send as many
together
in one signal as possible.
* src/nm-properties-changed-signal.c:
* src/nm-properties-changed-signal.h: Implement.
* src/Makefile.am: Add new files to build.
* src/NetworkManagerAP.c: Use the general framework for
* properties-changed
signal.
* src/nm-device-802-11-wireless.c: Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2971 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
- (wait_for_connection_expired): ensure info is valid
- (connection_added_default_handler): Should only remove pending
connection info when the manager has the connection that it's
waiting for. Fixes segfault in wait_for_connection_info().
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2969 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (merge_scanned_ap): make sure non-SSID-broadcasting APs are marked
as such, because even if the manager fills in the SSID, NM still
has to indicate to wpa_supplicant that the AP isn't broadcasting
its SSID
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2966 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Move ppp-manager over to dbus-glib. The big deal is that it was
the last piece of
code that used NM's own version of dbus signal handling and
custom dictionary
marshalling/unmarshalling. With this change, all that obsolete
code can disappear
and we get to maintain over 2000 lines less code.
* libnm-util/dbus-dict-helpers.c:
* libnm-util/dbus-dict-helpers.h: Remove.
* src/ppp-manager/nm-pppd-plugin.c: Convert it to use dbus-glib.
* src/ppp-manager/nm-pppd-plugin.xml: Implement.
* src/ppp-manager/nm-ppp-manager.c: Use dbus-glib instead of
* home-brewed dbus signal
handlers.
* src/nm-dbus-manager.c: Remove all the manual dbus signal
* handling.
* configure.in: Remove test/libnm-util/Makefile creation.
* test/Makefile.am: Remove libnm-util from SUBDIRS.
* test/libnm-util/: Remove the whole directory.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2965 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c (nm_policy_new): Initialize the
device_state_changed_idle_id variable or it would contain some
random value and the
schedule_change_check calls would not do anything.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2964 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* 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
* libnm-util/nm-utils.c (nm_utils_is_empty_ssid): Convert the
* ssid type to
"guint8 *" since it's usually used with GByteArray->data.
(nm_utils_ssid_to_utf8): Add it back, the applet needs it.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2961 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c (main): When dbus manager doesn't want to
* start, complain
about dbus manager, not named manager.
Make sure hal_manager and dbus_mgr are created before trying to
unreference.
* src/nm-dbus-manager.c: There was an issue with priv->proxy: We
* have a signal
handler for it's 'destroy' signal - we use it to catch
disconnects from dbus.
However, the same signal is emitted when we destroy it and
there's
nm_dbus_manager_cleanup -> destroy_cb -> nm_dbus_manager_cleanup
cycle.
(nm_dbus_manager_cleanup): Let go of the DBusGProxy before
releasing the DBusGConnection, since proxy needs a conneciton.
(destroy_cb): Set the private proxy to NULL before cleaning up
the manager.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2959 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Reimplement the invalid connection list. Don't try to re-activate a
connection that just failed or was canceled.
* src/nm-device.c
- (connection_secrets_failed_cb): fail device activation, don't just
deactivate the device. Listeners have to know about the failure.
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): exclude invalid connections from
the connection list given to a device's get_best_connection()
method
- (device_state_changed): tag failed connections as invalid; clear the
tag from successful connections
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2957 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix problems with interrupted activation. Previously, choosing an AP
from the menu, then choosing another one before the first connection was
successful wouldn't deactivate the device before starting the new connection
on that same device.
* src/NetworkManagerPolicy.c
- (deactivate_old_device, device_state_changed, state_changed,
nm_policy_new): wrong place to deactivate old devices
* src/nm-manager.c
- (pending_connection_info_destroy, finalize,
wait_for_connection_expired): decouple destruction of the pending
connection info from the manager device
- (connection_added_default_handler): deactivate any active or
activating device before starting a new activation
- (impl_manager_activate_device): deactivate any active or activating
device before starting a new activation; be sure not to leak
pending connection info if a new activation request arrives but
there's already a pending one in-process
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2956 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerAP.h
src/NetworkManagerAP.c
- (nm_ap_has_manufacturer_default_ssid): remove, unused. User clients
should handle default SSIDs and whether or not to autoconnect
to them
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2955 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
- (nm_device_802_11_wireless_class_init, merge_scanned_ap): new
'hidden-ap-found' signal (for internal use only) that allows the
NMManager to fill in the AP's SSID if a connection has that AP's
BSSID in its seen-bssids list
* src/nm-manager.c
- (manager_hidden_ap_found, nm_manager_add_device): attach to a
wireless device's hidden-ap-found signal and fill in the APs SSID
if possible
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2953 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-manager.c
src/nm-manager.h
- Add a 'connections-added' signal to batch together updates of large
numbers of connections, like when reading from a settings service
the first time. Otherwise, the policy would just activate the first
suitable connection it saw rather than waiting for the full list
to arrive.
- (nm_manager_class_init): register new signal
- (get_type_for_proxy, connection_get_settings_cb,
get_connection_for_proxy): centralize places where a proxy's setting
service is determined
- (free_get_settings_info): if the call being freed is the last call
in a pending call group, fire off the connections-added signal
- (internal_new_connection_cb): add call to a pending call group if
requested
- (list_connections_cb): always create a call group here, because this
call results in a batch of new connections
- (initial_get_connections): start getting system connections first
- (nm_manager_connections_destroy, emit_removed): actually emit the
removed signal when destroying connections
* src/NetworkManagerPolicy.c
- (nm_policy_new, connections_added): handle connections-added signal
from the manager
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2951 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): fix connection list reffing. Each
connection in the list returned by nm_manager_get_connections() is
reffed, but they weren't getting unreffed before returning
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2949 4912f4e0-d625-0410-9fb7-b9a5a253dbdc