* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Remove 'manual' and 'autoip' properties
- Add 'method' property
- (verify): fix verification with 'method'
- (finalize): free 'method'
- (set_property, get_property, nm_setting_ip4_config_class_init): fix
up for 'method'
* src/nm-device.c
- (real_act_stage3_ip_config_start): check IP4Config method
- (nm_device_new_ip4_autoip_config): add a note about not sucking in
the future
- (merge_ip4_config): IP settings are valid with DHCP too
- (real_act_stage4_get_ip4_config): handle all IP4Config methods
- (real_act_stage4_ip_config_timeout): don't do autoip on DHCP timeout
* src/nm-device-802-11-wireless.c
- (real_act_stage3_ip_config_start): remove; autoip only on demand
- (real_act_stage4_get_ip4_config): just chain up to parent; autoip
only on demand
* system-settings/plugins/ifcfg-fedora/parser.c
system-settings/plugins/ifcfg-suse/parser.c
- (make_ip4_setting): fix up for 'method'
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3443 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
- (nm_device_set_ip4_config): don't send property notifications when
the ip4 config is set to NULL; it causes a PropertyChanged signal
which dbus-glib can't parse because the value is NULL, which isn't
a legal object path. Setting the IP4 config to NULL is only
valid when deactivating a device anyway, so the device state change
will alert listeners that the ip4 config is invalid.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3431 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Move the 'carrier' property from NMDevice to NMDevice8023Ethernet;
convert the libnm-glib NMDevice8023Ethernet to cached properties
* introspection/nm-device-802-3-ethernet.xml
- New 'Carrier' property
- New 'PropertiesChanged' signal
* introspection/nm-device.xml
- Remove 'Carrier' property
- Remove 'CarrierChanged' signal
* src/nm-device-interface.c
src/nm-device-interface.h
- (nm_device_interface_init): remove 'carrier' property and
'carrier-changed' signal
* src/nm-device.c
src/nm-device.h
- (nm_device_get_carrier, nm_device_set_carrier): remove
- (nm_device_activate_stage5_ip_config_commit): don't bother updating
the link here; wired device will handle that
- (handle_dhcp_lease_change): don't bother updating link here
- (get_property, nm_device_class_init): remove carrier property
* src/nm-device-802-11-wireless.c
- (real_update_link, nm_device_802_11_wireless_class_init): remove
real_update_link(); wireless devices don't use carrier at all
- (link_timeout_cb, supplicant_iface_state_cb_handler,
supplicant_iface_connection_state_cb_handler,
supplicant_mgr_state_cb_handler): remove anything to do with carrier
* src/nm-device-802-3-ethernet.c
src/nm-device-802-3-ethernet.h
- (nm_device_802_3_ethernet_carrier_on,
nm_device_802_3_ethernet_carrier_off, constructor): use set_carrier()
instead of nm_device_set_carrier()
- (device_state_changed): update link from sysfs on activation;
replaces real_update_link()
- (real_update_link): remove, replaced by device_state_changed()
- (nm_device_802_3_ethernet_get_carrier, set_carrier): new functions
- (nm_device_802_3_ethernet_get_speed): move up with other getters/setters
- (real_get_generic_capabilities, real_can_interrupt_activation): use
new get_carrier function
- (get_property): add 'carrier' property
- (nm_device_802_3_ethernet_class_init): add 'carrier' property and
hook into property-changed signal helper
* src/NetworkManagerPolicy.c
- (device_carrier_changed): will only ever be called with a wired device
- (device_added): only hook up to carrier-changed for wired devices
* libnm-glib/nm-device.c
libnm-glib/nm-device.h
- (constructor, nm_device_class_init): remove carrier-changed signal
- (device_carrier_changed_proxy): remove; unused
- (nm_device_get_carrier): remove; carrier a property of wired devices
* libnm-glib/nm-device-802-3-ethernet.c
libnm-glib/nm-device-802-3-ethernet.h
- Convert to cached properties like AP and Wireless objects
- (nm_device_802_3_ethernet_get_hw_address): now returns a 'const char *'
instead of a 'char *', return value should not be freed
- (nm_device_802_3_ethernet_get_carrier): return current carrier status
- (constructor): hook into properties-changed helper
- (set_property, get_property): new functions
- (nm_device_802_3_ethernet_class_init): export GObject properties
* test/nm-tool.c
- (detail_device): strdup the wired hardware address too since it's
cached now
* libnm-glib/libnm-glib-test.c
- (dump_wired): strdup the wired hardware address too since it's
cached now
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
- (nm_device_deactivate): don't need to munge DNS here; that gets done
already in nm_device_set_ip4_config()
- (handle_dhcp_lease_change): fail the device if setting the IP4Config
due to a DHCP rebind fails
- (nm_device_set_ip4_config): send property notifications when the
ip4 config changes
- (get_property): only report IP4Config property during valid states
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): ignore devices that don't have an ip4
config; add parameter 'force_update' to allow callers to specify
that changes should be made even if the default device doesn't change
- (device_ip4_config_changed): update DNS and routing when the device's
IP4Config changes, like for DHCP updates
- (device_added): listen for ip4-config property changes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3425 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix address handling as a result of DHCP rebind/renew/reboot.
* src/NetworkManagerSystem.c
- (check_one_address): delete an address if it doesn't match a given
one for the same interface
- (nm_system_device_set_from_ip4_config): don't flush the default route,
be smarter about flushing addresses (only flush ones that don't
match the one we're about to apply)
* src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerSuSE.c
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGentoo.c
- (nm_system_delete_default_route): remove
* src/backends/NetworkManagerGeneric.c
src/backends/NetworkManagerGeneric.h
- (nm_generic_enable_loopback): fix the loopback device label
- (nm_generic_delete_default_route): remove; no longer used
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3424 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-interface.h
- Delimit property name words with '-', otherwise g_object_notify()
doesn't work the way we expect
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3423 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (update_routing_and_dns): don't change anything if the default device
hasn't changed; print something out when switching the default route
and DNS
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3419 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
- (handle_dhcp_lease_change): apply an IP4 config to a device in
response to a DHCP lease change
- (dhcp_state_changed): handle DHCP lease changes while activated
- (nm_device_set_ip4_config): remove a previously set named config
when setting an ip4 config
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-serial-device.c
- (nm_serial_device_send_command): report errno on error
- (get_reply_got_data): limit the size of the overall buffer
- (wait_for_reply_info_destroy): destroy result string
- (wait_for_reply_got_data): append received data to an overall buffer
until timeout, filled buffer, or error instead of keeping a per-call
buffer. Some devices send data slowly enough that this function
gets called multiple times for the same command stream.
- (nm_serial_device_wait_for_reply): initialize overall buffer for
wait_for_reply_got_data() here
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3415 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch based on ideas suggested by Bas Zoetekouw <bas@debian.org>
* src/named-manager/nm-named-manager.c
- (compute_searches): prefer searches before domains
- (compute_domain): new function
- (rewrite_resolv_conf): write out the 'domain' and 'searches' options
- (merge_one_ip4_config): if there are no searches in the source config,
merge domains of the source config into the target config
- (compute_nameservers): make formatting of resolv.conf a bit nicer
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3413 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-serial-device.c
- (get_reply_got_data): clean up indentation, shrink serial buffer
- (wait_for_reply_got_data): try to handle slower serial devices where
the reply is broken up into multiple reads by concatenating replies
together until either an error is received or the search string is
found
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3412 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device.c
- (nm_device_bring_down): deactivate the device if it's activating too,
not just if it's already activated. This makes sure that everything
from an association attempt is cleaned up (like DHCP for example)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3411 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Bas Zoetekouw <bas@debian.org>
* src/nm-ip4-config.c
src/nm-ip4-config.h
- (nm_ip4_config_add_search, nm_ip4_config_get_search,
nm_ip4_config_get_num_searches): add 'searches' as distinct from
domains. 'searches' is the correct way to store multiple search
domains, whereas 'domains' is really just supposed to store one
domain. Some sites abuse the DHCP 'domain-name' option to push
search domains to the client.
- (nm_ip4_config_add_domain): group with related functions (my patch)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3402 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Change manager's StateChange signal to StateChanged for consistency.
* introspection/nm-manager.xml
- Add 'StateChanged' signal
- Move 'StateChange' down to the deprecated section
* src/nm-hal-manager.c
- (nm_hal_manager_new): connect to 'state-changed' instead
* src/NetworkManagerPolicy.c
- (nm_policy_new): connect to 'state-changed' instead
* src/nm-manager.c
src/nm-manager.h
- (nm_manager_update_state): emit both 'state-changed' and 'state-change'
- (nm_manager_class_init): add 'state-changed' and not the deprecation
of 'state-change'
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
- (constructor, nm_client_class_init, client_state_changed_proxy):
track and proxy 'state-changed' instead of 'state-change'
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
First pass of multiple active device support. Expect bugs.
* src/nm-ip4-config.c
src/nm-ip4-config.h
- (nm_ip4_config_get_secondary, nm_ip4_config_set_secondary): remove;
there are better ways to do this in the named manager
* src/nm-device.c
src/nm-device.h
- (nm_device_can_activate): return whether the device can activate a
connection right now; taking into account things like carrier state
and rfkill state
- (nm_device_get_best_auto_connection): renamed from
nm_device_get_best_connection
- (real_act_stage4_get_ip4_config): MTU stuff is now handled in the
device subclasses themselves, so that each device can override the
MTU from it's NMSetting subclass if needed
- (nm_device_set_ip4_config): set MTU when setting up routes and stuff
in NetworkManagerSystem.c, not here
* src/named-manager/nm-named-manager.c
src/named-manager/nm-named-manager.h
- (nm_named_manager_name_owner_changed,
nm_named_manager_dbus_connection_changed): fix for changes to
rewrite_resolv_conf()
- (compute_nameservers): don't need the NMNamedManager at all, remove
from parameter list
- (merge_one_ip4_config): new function; merge ip4 configs together
- (rewrite_resolv_conf): write out resolv.conf from all the stored
ip4 configs; the VPN config takes precedence, then the best
device config, then the rest of the configs
- (get_domain_for_config): take the NMNamedManager as an argument
to check whether the config is the VPN config
- (add_ip4_config_to_named): fixups for removal of the 'secondary'
attribute from ip4 configs
- (add_all_ip4_configs_to_named): add all the configs in priority order
- (remove_ip4_config_from_named): fix for changes to
get_domain_for_config()
- (nm_named_manager_add_ip4_config): assign the config to the right slot
based on its type; callers must pass in the type now
- (get_last_default_domain): remove, unused
- (nm_named_manager_remove_ip4_config): handle config slots correctly
* src/nm-device-802-11-wireless.c
- (real_can_activate): new function
- (real_get_best_auto_connection): renamed from real_get_best_connection
- (real_act_stage4_get_ip4_config): handle MTU override
* src/nm-device-802-3-ethernet.c
- (real_can_activate): new function
- (real_get_best_auto_connection): renamed from real_get_best_connection
- (real_act_stage4_get_ip4_config): new function; handle MTU override
* src/vpn-manager/nm-vpn-connection.c
- (nm_vpn_connection_ip4_config_get): don't need to set the 'secondary'
attribute on the ip4 config
* src/NetworkManagerPolicy.c
- (nm_policy_auto_get_best_device): remove
- (nm_policy_device_change_check): remove
- (update_default_route): new function; set the default route via
the specified device
- (get_device_priority): new function; return the priority number of
a device type WRT which one should have the default route. Order is
(highest to lowest) wired, wireless, GSM, CDMA.
- (update_routing_and_dns): new function; determine which device should
have the default route, then update the routing table and DNS
- (maybe_auto_activate_device): new function; if a device is now
available for activation, find out what connection it would like to
activate and do it
- (schedule_activate_check): new function; if a device can be activated
now, schedule the activation. Each device may have only one
pending activation at a given time.
- (device_state_changed): if activation was canceled, try again,
possibly with another connection; if the device was activated,
update routing and DNS; if the device was deactivated, try again
with another connection
- (device_carrier_changed): if there is no carrier, deactivate the
device; otherwise schedule an activation check for the device
- (wireless_networks_changed): schedule an activation check for the
device
- (device_added): keep track of the signal handler IDs so they can
be removed when the device goes away
- (device_removed): remove any signal handlers that might be attached
to the device; update routing and DNS
- (schedule_activate_all): new function
- (connections_added, connection_added, connection_updated): when
connections change, schedule all devices for an activation check
- (connection_removed): when a device is deactivated because its
connection was removed, schedule another activation check for it
- (nm_policy_destroy): destroy pending activations and disconnect
all device signal handlers
* src/nm-manager.c
- (nm_manager_activate_device): if the device was already actived,
deactivate it
- (deactivate_old_device): remove
- (connection_added_default_handler, impl_manager_activate_device):
don't deactivate other devices when activating this one
* src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerSuSE.c
src/backends/NetworkManagerDebian.c
- (nm_system_get_mtu): remove; MTU should be provided through the
distro's system settings service plugin instead
- (nm_system_device_add_default_route_via_device): remove
- (nm_system_device_add_default_route_via_device_with_iface): remove
- (nm_system_device_replace_default_route): new function; call
generic implementation
* src/backends/NetworkManagerGeneric.c
src/backends/NetworkManagerGeneric.h
- (nm_generic_device_add_default_route_via_device,
nm_generic_device_add_default_route_via_device_with_iface): remove
- (nm_generic_device_replace_default_route): replace the default route
with the given route via some gateway
* src/NetworkManagerSystem.c
src/NetworkManagerSystem.h
- (nm_system_device_set_from_ip4_config): let the policy handle updates
to routing and DNS; but set the MTU here
- (nm_system_vpn_device_set_from_ip4_config): set the route with the
ip_iface of the active device; use the standard MTU setting function
- (nm_system_set_mtu): remove
- (nm_system_device_set_mtu): consolidate MTU setting code in one place
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3391 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
commit 736e888c683a2b630310c5fb3119fdb0466df223
Author: Tambet Ingo <tambet@gmail.com>
Date: Fri Mar 7 10:44:36 2008 -0600
Rework ppp-manager to set up dbus service instead of doing it in pppd plugin.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3388 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-hal-manager.c
- (nm_get_device_driver_name): use net.originating_device first, fall
back to physical device. HAL has deprecated physical_device.
* libnm-glib/nm-device.c
- (get_product_and_vendor): use net.originating_device first, fall
back to physical device. HAL has deprecated physical_device.
- (nm_device_update_description): s/physical_device_udi/orig_dev_udi
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3386 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-netlink.c
- (nm_netlink_get_default_handle): mistakenly removed too much code in
last commit; fix that
- (get_link_cache): print error string
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3385 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-netlink.c
- (nm_netlink_get_default_handle): NMNetlinkMonitor now uses libnl,
don't need this hack any more (Benoit Boissinot)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3384 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerPolicy.c
- (nm_policy_device_change_check): ensure that a previously active
device with a system connection has a link before denying a switch
to a user connection
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3369 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
- (link_timeout_cb): try again if scanning; deactivate the device when
activated if the link dies
- (supplicant_iface_connection_state_cb_handler): bump link timeout to
15 seconds
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3367 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
- (nm_device_802_11_wireless_reset_scan_interval): remove, unused
elsewhere; fold into the sole user in nm-device-802-11-wireless.c
- (device_cleanup): reset the scan interval lower when the device
deactivates
- (can_scan): base decision mostly off device state, not supplicant
interface state since the supplicant interface state isn't a
great indicator of whether the device is active or not
- (request_wireless_scan): clean up; schedule the next scan here
- (schedule_scan): only back the scan interval off if a new scan
actually gets scheduled; and make scan intervals tighter when the
device is disconnected
- (supplicant_iface_state_cb_handler): fold in the bits of
nm_device_802_11_wireless_reset_scan_interval() by resetting scan
interval to minimum
- (activation_success_handler): reset scan interval to something
reasonable
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3365 4912f4e0-d625-0410-9fb7-b9a5a253dbdc