* libnm-util/nm-utils.c
- (string_to_utf8): general function for conversion to UTF-8 assisted
by locale
- (nm_utils_ssid_to_utf8): use string_to_utf8()
- (nm_utils_garray_to_string): ensure returned string is UTF-8 safe
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3830 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/Makefile.am
introspection/nm-device.xml
introspection/nm-dhcp4-config.xml
- Add bits for the DHCP4Config property of the device, and the DHCP4Config
itself
* src/nm-device-interface.c
src/nm-device-interface.h
- Add the DHCP4Config property
* src/nm-device.c
- Keep track of DHCP4 options via a new DHCP4Config property and notify
D-Bus clients when it changes
* src/nm-dhcp4-config.c
src/nm-dhcp4-config.h
- Simple object to store DHCP4 options, export them over D-Bus, and
notify when they change
* src/dhcp-manager/nm-dhcp-manager.c
src/dhcp-manager/nm-dhcp-manager.h
- (nm_dhcp_manager_set_dhcp4_config, copy_dhcp4_config_option): copy and
filter server-returned DHCP options into an NMDHCP4Config object
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3829 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Roy Marples <roy@marples.name>
* configure.in
- Add --with-dhcp-client option
* src/dhcp-manager/Makefile.am
- pass DHCP_CLIENT_PATH on compile line
* src/dhcp-manager/nm-dhcp-manager.c
src/dhcp-manager/nm-dhcp-manager.h
- Genericize for both dhcpcd and dhclient
* src/dhcp-manager/nm-dhcp-dhclient.c
- Move dhclient stuff out to it's own file from nm-dhcp-manager.c
* src/dhcp-manager/nm-dhcp-dhcpcd.c
- Implement support for dhcpcd too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3823 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/src/nm-system-config-interface.c
(nm_system_config_interface_supports_add): Implement.
(nm_system_config_interface_add_connection): Return a boolean to notify
of errors.
* system-settings/src/nm-polkit-helpers.c:
* system-settings/src/nm-polkit-helpers.h: Move error declarations to
a separate file.
* system-settings/src/dbus-settings.c (impl_settings_add_connection):
Return an error when none of the plugins support add or if addition
failed for some reason.
* system-settings/src/nm-system-config-error.h:
* system-settings/src/nm-system-config-error.c: New files, mostly moved
here from nm-polkit-helpers.[ch].
* system-settings/src/Makefile.am: Build new files.
* system-settings/plugins/keyfile/reader.c
(read_array_of_array_of_uint): Make it more general so that it would
work for routes as well.
* system-settings/plugins/keyfile/writer.c
(write_array_of_array_of_uint): Ditto.
Fix the netmask/prefix writing.
* system-settings/plugins/keyfile/plugin.c (add_connection): Return
boolean to notify errors.
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c (update):
Return more specific error.
(delete): Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3821 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Modify the NMDevice::state-changed signal to include the previous state
and reason. Enables the applet to provide more information why device
activation failed.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3819 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* callouts/Makefile.am
callouts/nm-avahi-autoipd-action.c
callouts/nm-avahi-autoipd.conf
- avahi-autoipd callout to send options back to NM
* src/autoip.c
src/autoip.h
- remove
* src/nm-device.c
src/nm-device-private.h
src/nm-manager.c
- Use avahi-autoipd for IPv4LL functionality rather than really crappy
old custom stuff
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3816 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/plugins/ifcfg-fedora/reader.c
- (make_ip4_setting): handle DHCP_HOSTNAME; fix up prefix support to
handle PREFIX too; clean up
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3815 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Add properties for DHCP Client Identifier and DHCP Hostname
* src/dhcp-manager/nm-dhcp-manager.c
src/dhcp-manager/nm-dhcp-manager.h
- (nm_dhcp_manager_begin_transaction): take the connection's ip4-config
setting as an argument to pass on to the dhclient config file
creation function
- (nm_dhcp_manager_cancel_transaction_real): remove dhclient config when
DHCP is torn down
- (dhclient_run): punt config file handling to create_dhclient_config()
- (create_dhclient_config): create an interface-specific dhclient
config file since there may need to be interface-specific options
passed to dhclient
- (merge_dhclient_config): merge normal distro dhclient config file and
add options from the connection
- (nm_dhcp_device_new): generate the interface specific dhclient
config file path once
- (nm_dhcp_device_destroy): handle partially initialized objects; free
dhclient config file path
* src/nm-device.c
- (real_act_stage3_ip_config_start): pass ip4-config, if any, to the
DHCP manager when starting DHCP
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3805 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/nm-active-connection.xml
introspection/nm-vpn-connection.xml
libnm-glib/nm-active-connection.c
src/nm-activation-request.c
src/nm-active-connection.h
src/vpn-manager/nm-vpn-connection.c
- Remove "SharedServiceName" and "SharedConnection" bits from the D-Bus
and libnm-glib API since sharing didn't get implemented that way
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3797 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-wifi.c
- (can_scan): don't scan when a shared connection is activated since
that makes drivers mad (causing disconnects); also NM doesn't need
to hedge against disconnects by keeping up-to-date network topology
because the connection originates from the local machine, and thus
there should be no disconnects
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3796 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix mobile broadband username/password issues. NM was never requesting
mobile broadband secrets, nor was it passing back the username and password
if it had them.
* marshallers/nm-marshal.list
- Add some new types for activation request objects
* src/nm-activation-request.c
src/nm-activation-request.h
- (get_secrets_cb): pass the caller type in the signal
- (nm_act_request_request_connection_secrets): take a caller type, so
that GetSecrets() reply handlers know who asked for the secrets in
the first place; use secret hints too so the settings service can
figure out exactly what NM wants (ie, PIN or the PPP password)
* src/ppp-manager/nm-ppp-manager.c
src/ppp-manager/nm-ppp-manager.h
- (impl_ppp_manager_need_secrets): nm_connection_need_secrets() won't
detect needed secrets when the secret could be blank, like GSM/CDMA
passwords. So always ask for secrets, and send a hint as to what
secret we really want.
- (nm_ppp_manager_update_secrets): make function more generic by making
the device specific class figure out the username and password, and
accept an error argument to return back over D-Bus
* src/nm-device-wifi.c
- (link_timeout_cb, handle_auth_or_fail): update for changes to
nm_act_request_request_connection_secrets()
- (real_connection_secrets_updated): update for 'caller' changes
* src/nm-device.c
src/nm-device.h
- (connection_secrets_updated_cb, connection_secrets_failed_cb): update
for 'caller' changes
* src/nm-device-ethernet.c
- (real_connection_secrets_updated): update for 'caller' changes and
move logic for getting PPPoE username and password here before
calling nm_ppp_manager_update_secrets()
- (link_timeout_cb, handle_auth_or_fail): update for changes to
nm_act_request_request_connection_secrets()
* src/nm-cdma-device.c
- (real_connection_secrets_updated): pass username and password back
to the PPP manager when required
* src/nm-gsm-device.c
- (enter_pin): send the required secret name to the settings service
- (real_connection_secrets_updated): pass username and password back
to the PPP manager when required
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3794 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Attempt to fix various issues causing rh #448889. Mainly, to qualify for
the DISCONNECTED state, the device must not be rfkilled _and_ have a valid
priv->supplicant.iface. When either condition is false, the device should
transition back to UNAVAILABLE because it cannot be used.
* src/nm-device-wifi.c
- (constructor): cleanup; connect to supplicant manager here since the
supplicant manager is always around
- (supplicant_interface_acquire): rename from init_supplicant_interface,
ensure the supplicant manager is in the IDLE state
- (supplicant_interface_release): rename from cleanup_supplicant_interface,
cancel any pending scans too
- (real_bring_up): don't set up the supplicnat interface here, because
we need the supplicant interface at times when the device may not
be "up"
- (real_take_down): just remove the periodic source
- (schedule_scan): ensure a state that would peg the CPU doesn't happen
- (remove_supplicant_interface_connection_error_handler): cleanup; don't
do anything if there's no supplicant interface
- (cleanup_association_attempt): cleanup
- (supplicant_iface_state_cb_handler): request an immediate scan when
the interface enters the READY state; transition to UNAVAILABLE
state when the interface goes down because the device can't be used
without a supplicant interface
- (supplicant_mgr_state_cb_handler): if the supplicant goes away, clean
up and transition to UNAVAILABLE; if the supplicant becomes ready,
acquire the supplicant interface and transition to DISCONNECTED
if the radio isn't killed
- (nm_device_wifi_dispose): move most of device_cleanup() here
- (state_changed_cb): release any existing supplicant interface; if the
radio is enabled then try to acquire a new supplicant interface;
if the radio is enabled and a supplicant interface has been acquired,
we can transition to DISCONNECTED
- (nm_device_wifi_set_enabled): if bringing the hardware up failed,
don't enable the radio, because HAL probably lied to us about the
killswitch being off. If bringing the hardware up worked, then
try to grab a supplicant interface, and if that was successful,
transition to DISCONNECTED
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3785 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-interface.c
- (request_scan_results, nm_supplicant_interface_dispose,
wpas_iface_query_scan_results): cleanup; scan_results_timeout is now
the id of the timeout, not a GSource
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3784 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/backends/NetworkManagerSuSE.c (nm_system_activate_nis): Fix a
bunch of typoes introduced by "Patch from David Cantrell
<dcantrell@redhat.com> and me".
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3783 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-serial-device.c:
* src/nm-gsm-device.c:
* src/nm-cdma-device.c: Move the pending call handling to a common location
in serial device. Handle setting device state to failed in one place as well.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3782 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-hal-manager.c
- Rework killswitch handling to query killswitch status immediately
when the first killswitch is added, so that rfkill state is
known as early as possible
- Also treat failure of GetPower() as rfkill when the dbus method
call times out (but not when the HAL callout returns an error)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3781 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Adel Gadllah <adel.gadllah@gmail.com>
* src/nm-device-wifi.c
- (link_timeout_cb): don't ignore disconnects due to scanning
- (supplicant_iface_connection_state_cb_handler): instead, schedule
a longer timeout when scanning; avoids case where supplicant can't
find the AP and just keeps scanning forever but isn't connected
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3774 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-vpn-plugin-ui-interface.c
libnm-glib/nm-vpn-plugin-ui-interface.h
- 'validity-changed' -> 'changed' to work better with the connection
editor. Plugin UI widgets should emit 'changed' whenever their
UI values change in a meaningful way.
- (nm_vpn_plugin_ui_widget_interface_update_connection): the
update_connection member now returns validity of the UI widget
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3761 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* configure.in
libnm-glib/libnm_glib_vpn.pc.in
- add a .pc file for libnm_glib_vpn
* libnm-glib/nm-vpn-plugin-ui-interface.c
libnm-glib/nm-vpn-plugin-ui-interface.h
- Move the glib/GNOME VPN UI plugin interface into libnm-glib and
rework it substantially
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3755 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add a GError argument to nm_connection_verify() and nm_setting_verify(),
and add error enums to each NMSetting subclass. Each NMSetting subclass now
returns a descriptive GError when verification fails.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3751 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerSystem.c
- (nm_system_device_set_ip4_route,
nm_system_device_replace_default_ip4_route): check for the right
return value from rtnl_route_add() to know when to add a gateway
route (from Tambet)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3749 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Tambet Ingo <tambet@gmail.com>
* src/ppp-manager/nm-ppp-manager.c: Add ppp stats monitoring, signal the
changes.
* src/nm-serial-device.c: Monitor "ppp-stats" signals from NMPPPManager. Add
a signal to emit these changes over dbus.
* src/Makefile.am: Genereate nm-serial-device-glue.
* libnm-glib/nm-serial-device.[ch]: Implement.
* libnm-glib/nm-cdma-device.[ch]
libnm-glib/nm-gsm-device.[ch]: Inherit from NMSerialDevice.
* libnm-glib/Makefile.am: Add nm-serial-device.[ch].
* introspection/nm-device-serial.xml: Implement.
* introspection/all.xml: Fix a couple of typos, add nm-device-serial.xml.
* introspection/Makefile.am: Add nm-device-serial.xml.
* include/NetworkManager.h: Add a DBus interface for serial device.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3740 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/dnsmasq-manager/nm-dnsmasq-manager.c
src/dnsmasq-manager/nm-dnsmasq-manager.h
- (create_dm_cmd_line): use the IP4 address of the ip4-config to
calculate the addresses passed to dnsmasq instead of hard-coding
them
* src/nm-device.c
- (nm_device_new_ip4_shared_config): be somewhat dynamic when choosing
IP addresses for shared connections to guard against shared
connection address collisions
- (real_act_stage4_get_ip4_config): handle possible NULL ip4-configs on
error conditions
- (nm_device_activate_stage5_ip_config_commit): pass ip4-config to
the dnsmasq manager
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3738 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): set the default connection _after_ unsetting
default on all non-default connections so that two connections can
never be default at the same time
- (device_state_changed): start and stop connection sharing when
needed
- (active_connection_default_changed): restart or stop sharing when
the default connection changes to keep shared connections always
NAT-ed through the default connection
- (check_sharing): handle activation/deactivation of shared connections
- (sharing_restart): atom-bomb approach to connection sharing until we
can use libnl; reinit all sharing when the default connection or
shared connections change
- (sharing_init, sharing_stop): evil functions that init and deinit
iptables
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3737 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
- (clear_act_request): unset the 'default' property of the activation
request when clearing it to ensure the property changed signal gets
delivered and handled
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3735 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c
- (access_point_removed_proxy): actually unref the AP after removing
it from the device's AP list. Fixes refcounting bug for APs that
caused them to get mixed up in the applet's menu.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3734 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/src/nm-polkit-helpers.c
- (create_polkit_context): in PolicyKit 0.6, polkit_context_init() will
unref the context if the initialization fails; also avoid spew when
the error isn't set
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3731 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix memory leaks.
* system-settings/src/nm-system-config-hal-manager.c (get_type_for_udi):
Free data returned from dbus method call.
* system-settings/src/nm-polkit-helpers.c (check_polkit_privileges):
dbus_g_method_get_sender() returns a duplicated string, free it
when done.
(check_polkit_privileges): Looks like policykit sometimes returns
error and non-null return value, don't leak errors in that case.
* system-settings/src/main.c (find_plugin): Don't leak existing
plugin names.
(load_stuff): Don't leak device list and list items.
(have_connection_for_device): Don't leak connection list.
* system-settings/plugins/keyfile/reader.c (read_one_setting_value):
Free the data received from g_keyfile_get_*.
* system-settings/plugins/ifcfg-suse/parser.c (READ_WEP_KEY): Free
the key when the security object is updated.
* src/supplicant-manager/nm-supplicant-interface.c (scan_results_cb):
Free data returned from dbus method call.
(iface_state_cb): Ditto.
(add_network_cb): Ditto.
(nm_supplicant_interface_add_cb): Don't make another copy of already
duplicated object path.
(nm_supplicant_interface_add_to_supplicant): Free the driver GValue
when done.
* src/supplicant-manager/nm-supplicant-config.c
(ADD_STRING_LIST_VAL): Fix a memory leak.
* src/nm-manager.c (free_get_settings_info): Free the allocated
memory slice.
(list_connections_cb): Free data returned from dbus method call.
(system_settings_get_unmanaged_devices_cb): Ditto.
* src/nm-device-802-11-wireless.c (device_cleanup): Free ssid.
* system-settings/plugins/ifcfg-suse/shvar.c (svCloseFile):
* system-settings/plugins/ifcfg-fedora/shvar.c (svCloseFile):
* src/backends/shvar.c (svCloseFile): Free the duplicated content
of the GList.
* libnm-util/nm-setting.c (nm_setting_from_hash): Free the constructor
arguments after the object is created.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3721 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.[ch]: Add static routes property.
* src/nm-ip4-config.[ch]: Store the static routes as a list of
NMIP4Address, update the getters and setters.
* src/dhcp-manager/nm-dhcp-manager.c (nm_dhcp_manager_get_ip4_config):
Use the updated NMIP4Config routes api.
* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Merge
static routes as well.
* src/NetworkManagerSystem.c (netmask_to_prefix): Implement.
(nm_system_device_set_from_ip4_config): Use the updated NMIP4Config
routes api.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3715 4912f4e0-d625-0410-9fb7-b9a5a253dbdc