* 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
* src/nm-device.c
- (dnsmasq_state_changed_cb): new function; fail the connection if
something happens to dnsmasq
- (nm_device_new_ip4_shared_config): new function; create a new
ip4-config for shared connections. Shared connections always use a
fixed static IP address.
- (real_act_stage4_get_ip4_config): handle shared connections; fix
autoip connections by actually using the returned ip4-config and
not leaking it
- (nm_device_activate_stage5_ip_config_commit): start dnsmasq for shared
connections
- (nm_device_deactivate_quickly, nm_device_dispose): terminate dnsmasq
if its active
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3711 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Add a 'shared' method to indicate that this connection should be
brought up with a DHCP and proxy DNS server to facilitate
connection sharing.
- (verify): 'shared' method doesn't allow DNS or searches either
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3709 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-private.h
- Remove unused prototypes and clean up
* src/nm-device.c
- Remove anything related to system_config_data, which is no longer used
- (nm_device_new_ip4_autoip_config): make static
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3707 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c
(file_changed): Fix a bug where suse system settings plugin didn't
update the connections automatically when the files changed.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3700 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-wireless.c
libnm-util/nm-setting-wireless.h
- (set_property, get_property, nm_setting_wireless_class_init): add the
'adhoc-create' property, which when TRUE indicates that NM should
create this connection as an adhoc wifi network if it's not found
as an adhoc network during scanning. Can be used to auto-create
adhoc networks when used in combination with autoconnect.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3697 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Dennis Noordsij <dennis.noordsij@helsinki.fi>.
* src/nm-gsm-device.c: Don't try to reset the modem before PIN is
checked, it doesn't work on some devices.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3696 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/ppp-manager/nm-ppp-manager.c (nm_ppp_manager_stop): Make sure
pppd gets killed, if SIGTERM doesn't do it's job, SIGKILL it.
* src/dhcp-manager/nm-dhcp-manager.c (nm_dhcp_manager_get_ip4_config):
Use inet_aton() everywhere to improve error detection.
Don't fall back to 'dhcp_server_identifier' if the gateway is not
provided.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3695 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/supplicant-manager/nm-supplicant-settings-verify.c
- Switch 'bssid' from bytes to keyword type
- (validate_type_keyword): allow NULL keyword lists
* src/supplicant-manager/nm-supplicant-config.c
- (nm_supplicant_config_add_setting_wireless): convert the bssid from
a byte array to string form, which is what the supplicant expects
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3686 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add a flag to NMSettingIP4Config to make it possible to ignore the DNS
information received from DHCP.
* libnm-util/nm-setting-ip4-config.c: Add a new membet "ignore_dhcp_dns"
to make it possible to ignore the DNS information (both servers and
searches) returned by DHCP server.
* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Reset the
name servers and searches if "ignore_dhcp_dns" is set.
* src/nm-ip4-config.c (nm_ip4_config_reset_nameservers)
(nm_ip4_config_reset_searches): Implement.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Remove anything mDNS related. This is better done from a distro-specific
dispatcher script. Plus, any distro using avahi doesn't need to restart
avahi, since avahi can handle interface changes just fine using netlink.
* configure.in
- Remove --with-mdns-provider
* src/NetworkManagerPolicy.c
- (global_state_changed): don't restart the mdns provider
* src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerMandriva.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
- (nm_system_restart_mdns_responder): remove
* src/backends/NetworkManagerGeneric.c
src/backends/NetworkManagerGeneric.h
- (nm_generic_restart_mdns_responder): remove
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3684 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Don't remove all devices on waking up, sync with HAL.
* src/nm-manager.c (nm_manager_udi_is_managed): Implement.
(sync_devices): Implement, based on hal_manager_hal_reappeared_cb.
(hal_manager_hal_reappeared_cb): Just call sync_devices.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3680 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-gsm-device.c (device_state_changed): Make sure we don't leave the
serial device open when we're not connecting or connected.
* src/nm-cdma-device.c (device_state_changed): Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3679 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/plugins/ifcfg-fedora/reader.c
- (make_ip4_setting): get a fallback gateway from /etc/sysconfig/network
if the ifcfg doesn't specify one
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3675 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Make the system settings service exit when the bus goes away. Since it's
a bus-activated service, it's lifetime is limited to the bus that activated
it (rh #444976).
* system-settings/src/Makefile.am
system-settings/src/nm-system-config-hal-manager-private.h
- Remove nm-system-config-hal-manager-private.h
* system-settings/src/nm-system-config-hal-manager.c
- (nm_system_config_hal_manager_reinit_dbus,
nm_system_config_hal_manager_deinit_dbus): remove
* system-settings/src/main.c
- (dbus_reconnect): remove
- (dbus_cleanup): don't tell the HAL manager to deinit dbus
- (destroy_cb): just quit when the bus goes away
- (start_dbus_service, dbus_init): simplify
- (main): destroy the wired devices hash table after destroying
the HAL manager so we don't have to disconnect signals from the
HAL manager
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3674 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Move crypto functions from nm-applet to libnm-util.
* libnm-util/nm-setting-8021x.c (nm_setting_802_1x_set_ca_cert)
(nm_setting_802_1x_set_client_cert)
(nm_setting_802_1x_set_phase2_ca_cert)
(nm_setting_802_1x_set_phase2_client_cert)
(nm_setting_802_1x_set_private_key)
(nm_setting_802_1x_set_phase2_private_key): Implement. Given a certificate
file (or private key and it's password), read the certificate data.
* libnm-util/crypto_nss.c:
* libnm-util/crypto_gnutls.c:
* libnm-util/crypto.[ch]: Move here from nm-applet.
* configure.in: Check for NSS and gnutls here (moved here from nm-applet).
* system-settings/plugins/ifcfg-suse/parser.c (read_wpa_eap_settings):
Imlement WPA-EAP configuration reading from sysconfig.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3673 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix Linus' bug in rh #134886
* src/nm-device-802-3-ethernet.c
- (constructor): request initial carrier state
* src/nm-netlink-monitor.c
- (nm_netlink_monitor_request_status): schedule emission of carrier
signals after refilling the link cache. Because the refill is a
synchronous operation, the normal message hander won't get called
since libnl has already consumed the messages.
- (deferred_emit_carrier_state): emit carrier states from an idle handler
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix refcounting issues over sleep/wake when a VPN connection was active that
caused NM to try registering an object path for a device upon wake that was
the same as an already registered object path.
* src/nm-device.c
- (nm_device_take_down): properly handle cases where the device is
no longer active but was just active, and therefore must be
deactivated. When a device moves to unmanaged mode, this function
previously would not deactivate the device, because the state was
already unmanaged by the time this function was called.
* src/vpn-manager/nm-vpn-connection.c
- (device_state_changed): properly handle multiple devices states in
which the device is now deactivated. Code previously didn't handle
transitions to the UNAVAILABLE (like rfkill or carrier off) and
UNMANAGED states.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3667 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-private.h
src/nm-device.c
- (nm_device_hw_bring_up, nm_device_hw_take_down): export
* src/nm-device-802-11-wireless.c
- (nm_device_802_11_wireless_set_enabled): take devices up
and down as appropriate for the rfkill state
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3666 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* marshallers/nm-marshal.list
- Add VOID:POINTER,STRING marshaller for ifcfg-fedora plugin
* system-settings/plugins/ifcfg-fedora/Makefile.am
system-settings/plugins/ifcfg-fedora/nm-inotify-helper.c
system-settings/plugins/ifcfg-fedora/nm-inotify-helper.h
- Implement a minimal inotify helper for watch paths for IN_CLOSE_WRITE
events. Solely for use watching ifcfg files to pick up changes
to their hardlinks, since GIO doesn't support this yet (bgo #532815)
* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
- (nm_ifcfg_connection_class_init): new 'ifcfg-changed' signal when the
file contents change
- (finalize): clean up inotify watches
- (nm_ifcfg_connection_new): store keyfile; inotify watch the keyfile
and the connection ifcfg for changes on their hardlinks
- (files_changed_cb): proxy the changed signal back out to listeners
* system-settings/plugins/ifcfg-fedora/plugin.c
- (dir_changed):
- (connection_ifcfg_changed): re-read the connection when the ifcfg
changes
- (read_one_connection): connect to change signals on the new connection
- (dir_changed, connection_changed_handler,
handle_connection_remove_or_new): break out connection change
handling and connection new/remove handling so it can be used from
both the GFileMonitor callback and the NMIfcfgConnection changed
signals
* system-settings/plugins/ifcfg-fedora/reader.c
system-settings/plugins/ifcfg-fedora/reader.h
- (connection_from_file): return the keyfile path the connection would use
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3663 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/src/nm-polkit-helpers.c (create_polkit_context): Use a
single PolKitContext which is shared by all. PolKitContext::unref leaks
just about everything, including all open file descriptiors and results
in 99% cpu usage when data arrives to any of the fds that don't belong
to any context anymore.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3662 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* gfilemonitor/glocaldirectorymonitor.c
gfilemonitor/glocaldirectorymonitor.h
- (g_local_directory_monitor_constructor): actually subscribe to the
watch
- (_g_local_directory_monitor_new): ensure that inotify is started up
* gfilemonitor/glocalfilemonitor.c
gfilemonitor/glocalfilemonitor.h
- (g_local_file_monitor_constructor): actually subscribe to the watch
- (_g_local_file_monitor_new): ensure that inotify is started up
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3661 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* configure.in
- record PolicyKit version
* system-settings/src/nm-polkit-helpers.c
- (check_polkit_privileges): use polkit_context_can_caller_do_action()
with PolicyKit <= 0.6
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3658 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Update Fedora system-settings plugin to support latest API and use
GFileMonitor rather than home-rolled inotify code.
* system-settings/plugins/ifcfg-fedora/Makefile.am
system-settings/plugins/ifcfg-fedora/common.h
system-settings/plugins/ifcfg-fedora/plugin.c
- Update to latest system settings plugin API; use GIO instead of
custom inotify code; use NMIfcfgConnection objects instead of
ConnectionData structures tacked onto NMConnection objects
* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.h
- Implement an NMExportedConnection subclass mapping ifcfg files to
connections
* system-settings/plugins/ifcfg-fedora/reader.c
system-settings/plugins/ifcfg-fedora/reader.h
- Move ifcfg parsing bits here from parser.c
* system-settings/plugins/ifcfg-fedora/parser.c
system-settings/plugins/ifcfg-fedora/parser.h
- Remove; most code moved to reader.c
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3656 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* configure.in
Makefile.am
gfilemonitor/*
- Add a private copy of the GIO GFileMonitor code, with a custom GFile
implementation, so that the same change monitoring code can be used
on systems without glib-2.14 (like Fedora 8)
* system-settings/plugins/keyfile/Makefile.am
system-settings/plugins/keyfile/plugin.c
system-settings/plugins/ifcfg-suse/Makefile.am
system-settings/plugins/ifcfg-suse/plugin.c
- Use private gfilemonitor code if GIO is not present
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3654 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Use PolicyKit to authorize the system settings' AddConnection method
and the system settings connections' Update and Delete methods.
* libnm-glib/nm-settings.c (impl_exported_connection_update)
(impl_exported_connection_delete, nm_exported_connection_update)
(nm_exported_connection_delete): Return boolean and fill GError
to notify the callers of the reasons why it might have failed.
* libnm-glib/nm-dbus-settings-system.c
(nm_dbus_settings_system_add_connection): Return the error from dbus
call so that the callers can see why it failed.
* libnm-glib/nm-dbus-connection.c (update, delete): Update the
signatures.
* system-settings/src/nm-polkit-helpers.[ch]: Implement.
* system-settings/src/nm-sysconfig-connection.[ch]: Implement. New
abstract base class that checks PolicyKit permissions.
* system-settings/src/dbus-settings.c:
(impl_settings_add_connection): Check the policy before carring out
the request.
* system-settings/plugins/keyfile/nm-keyfile-connection.c:
Inherit from NMSysconfigConnection, check the policies before
allowing updating or removing.
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c:
Inherit from NMSysconfigConnection.
* introspection/nm-exported-connection.xml: Annotate "Update" and
"Delete" methods with async flag so that the implementations can get
access to DBusGMethodInvocation.
* system-settings/src/dbus-settings.c
(settings_add_connection_check_privileges): Implement.
(impl_settings_add_connection): Check the privileges before adding a new
connection. Improve error reporting.
* introspection/nm-settings-system.xml: Make the 'AddConnection' method
async so that the implementation can access DBusGMethodInvocation.
* configure.in: Check for PolicyKit.
* policy/org.freedesktop.network-manager-settings.system.policy:
New file.
* policy/Makefile.am: Install the policy file.
* configure.in: Add 'policy' subdir.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3646 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* system-settings/plugins/keyfile/reader.c
- (read_one_setting_value): handle IP address items separately
- (read_array_of_uint): read IPv4 DNS option as a string array
- (read_array_of_array_of_uint): read IPv4 address tuples as a string
array
* system-settings/plugins/keyfile/writer.c
- (write_setting_value): handle IP address items separately
- (write_array_of_uint): handle IPv4 DNS option as a string array,
not an array of uint, so that it's user-editable
- (write_array_of_array_of_uint): handle IPv4 address tuples as string
arrays, so they are user-editable
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3643 4912f4e0-d625-0410-9fb7-b9a5a253dbdc