* Expose activation stages to NetworkManager clients, like the applet
* Add Diana's progress icons to the applet, cued off NM activation stage
* Use more descriptive tooltips, cued off NM activation stage
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@611 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* gnome/applet/main.c
- Fix session management so the applet is actually managed now
* gnome/applet/passphrase-dialog.c
- (nmi_passphrase_dialog_show): bash focus-stealing prevention in the face
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@609 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Suggestion from Bill Moss:
* src/NetworkManagerSystem.c
- (nm_system_device_set_up_down_with_iface): ignore ENODEV
* src/NetworkManager.c
- (nm_data_free): move destruction of the various managers after
release of device list, because deactivating and freeing a device
requires at least the named manager
- (nm_poll_and_update_wireless_link_state):
(nm_device_link_activated):
(nm_device_link_deactivated):
don't grab the device list lock when actually updating device
link status or strength, since nm_device_set_link_active()
needs to call nm_get_active_device(), which also locks the device list.
* src/NetworkManagerDevice.c
- (nm_device_set_link_active): if a device's link switches from off->on,
and it's wired, and the active device is wireless (or there is no
active device), activate the new device whose link just came on
- (link_to_specific_ap): try to smooth over intermittency in wireless links
my only calling the link to the current ap "failed" when more than 2
consecutive link checks have failed
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@606 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (nm_device_probe_wireless_link_state): don't lock the scan mutex here
but let link_to_specific_ap() do the locking where it needs
Patch from Bill Moss:
* src/NetworkManagerSystem.c
- Set MTU of VPN devices to 1412
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@605 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Remove NM_STATE_SCANNING from NetworkManager.h and applet code
* Fix some holes in device activation and retaining the currently connected
access point
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@602 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Kill dhcpcd. We now use "dhcdbd", a dbus daemon that controls dhclient.
This means that NetworkManager shouldn't have DHCP issues anymore. It also
means you need dhcdbd, which you can get here (get the latest one):
http://people.redhat.com/jvdias/dhcdbd/
Technically NetworkManager can use any DHCP daemon that uses the same DBUS
interface as dhcdbd.
* Rewrite device activation to facilitate the new DHCP infrastructure and
future improvements. Its now "activation request" based, ie there is a single
activation request composed of the device, access point, and other info which
follows the entire activation process. There are 5 stages of the activation
process which correspond to:
1) Device preparation
2) Device configuration (bring it up, set ESSID/Key/etc)
3) IP Config Start (fire off DHCP if we're using it)
4) IP Config Get (grab config from DHCP or static config files)
5) IP Config Commit (set device's IP address, DNS, etc)
Note that there is no longer a "scanning" step, since the access point must
be known _before_ activation starts. If the access point drops out or does
not exist for some reason, the entire activation process fails and must be
restarted for a different access point or device.
Patch from Bill Moss:
* gnome/applet/applet.c
- Fix type of vpn_failure dialog -> vpn_banner dialog
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@597 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* gnome/applet/applet-dbus-vpn.c
gnome/applet/applet.c
gnome/applet/applet.h
- Fix up active VPN handling so that we reliably know when a VPN
connection has been deactivated
* src/vpn-manager/nm-vpn-manager.c
- Remove duplicate VPNConnectionChange signal
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@593 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Peter Jones:
* Remove usage of varargs to fix crashes on PPC (RH #154336)
Patch from Bill Moss:
* src/NetworkManagerSystem.c
- Fix checking of return value from ioctl()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@592 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Fix choosing of wireless networks and "Other wireless network..." from the applet
* Warn and exit if icons cannot be found
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@590 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Merge the applet and the info-daemon, and move the converged
applet under gnome/applet
* Move libnm_glib to gnome/libnm_glib
* Convert most dbus calls between the applet, info-daemon, and NM
into async calls
* Fix a few things valgrind noticed
* Make NM broadcast state more reliably
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@586 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patches from Tom Parker:
- Fix memleaks
- Join with worker thread rather than polling for its exit
Patch from Bill Moss:
- Cull duplicate ESSIDs from the scan list, taking highest strength AP
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@573 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Initial VPN Support
- supports 'vpnc'
- reworks device IP configuration, backend files have changed and will need
to be updated for all distributions. I will try to do what I can for
them, but I cannot test them.
- Move named directory to src/named-manager
- Make backends directory self-contained
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@571 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add debug code for socket/file descriptor leaks. We register every socket
that we open (except for stuff in dhcpcd/) for tracking, and print out the
list of sockets that we forgot to close on shutdown. This also consolidates
about 4 places where we opened sockets into 1 function in NetworkManagerUtils.c
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@559 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessAppletDbus.c
- (nmwa_dbus_call_nm_method): remove some commented code
* src/NetworkManagerAPList.[ch]
- (nm_ap_list_remove_ap_by_essid): new function
* src/NetworkManagerDevice.c
- (nm_device_wireless_force_use): remove access points from the ignore list
when the user forces them
* src/nm-dbus-device.c
- (nm_dbus_device_get_active_network): fix up escaping of object paths
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@557 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c:
- (nm_completion_scan_has_results): restore pre-completion-patch behavior
of only erroring after the second consecutive scan times out. Also
don't exit when the card requires more time than we can give it, just
log the event and continue.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@552 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Perform scans during device activation, if needed. Both activation
and scans run in the same GMainContext. Therefore, if an access point
is not found by the time the device starts activation, it will not
be available until after activation. We now try to scan during
activation (in nm_wa_test) every 15s so that all available access
points are more likely to be found and available for the activation
procedure.
Also change nm_wireless_link_state_handle() to only update the "best"
AP if we are not forcing a device and if we are not about to change
state. This attempts to work around a race when forcing a device,
where the forced AP would get cleared out too soon by the link state
checking timeout in the main thread, and the activation attempt with
that AP would fail.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@545 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Tighten up handling of wireless devices that don't support wireless
scanning (ie, Orinoco). Due to restructuring of code, these devices
hadn't been doing pseudo-scanning for a while either and would just
spin waiting for an access point. They are now manual devices where
the user must choose the access point from the menu every time. All
"allowed" access points are listed in the applet's menu regardless
of whether or not they can be seen by the card, since it can't scan
anyway.
* src/NetworkManager.c
- (nm_wireless_link_state_handle): new function, but only update
the "best" ap for non-scanning devices when its not activating,
and when no device is being forced on the card
- (nm_link_state_monitor): split wireless link state handling out
into separate function
* src/NetworkManagerDevice.c
- (nm_device_copy_allowed_to_dev_list): new function
- (nm_device_new): populate non-scanning cards' AP lists with
access points from the "allowed" list
- (nm_device_new): don't start a scanning timeout for devices that
can't scan
- (nm_device_activation_schedule_finish): new parameter, should be
the AP that failed to be connected to, pass it on to the
activation finish function in NetworkManagerPolicy.c
- (nm_device_activate_wireless): don't ever try to get a new AP
for non-scanning devices, just fail. The user must choose
a new access point manually.
- (nm_device_activate): grab the AP that failed connection and
pass it on
- (nm_device_update_best_ap): Clear the best AP if we don't have
a link to it, user must manually choose a new one
- (nm_device_do_pseudo_scan): remove function
- (nm_device_wireless_process_scan_results): remove bits for non-
scanning cards since they never get here
- (nm_device_wireless_scan): remove bits for non-scanning devices,
and fake the scan list for test devices a bit earlier
* src/NetworkManagerPolicy.c
- (nm_policy_activation_finish): use the failed_ap that we get
passed rather than getting the best_ap from the card, which
may have changed since we were scheduled
- (nm_policy_allowed_ap_list_update): for non-scanning devices,
update their scan list directly from the allowed list when
we get updates to the allowed list from NetworkManagerInfo
* src/NetworkManagerPolicy.h
- New member for failed access point in NMActivationResult
-------------------------------------
Driver Notification patch: notifies the user when their driver
sucks. Gives them the option to ignore further insertions
of the card that has the sucky driver.
* NetworkManager.h
- Remove the SEMI_SUPPORTED member from the NMDriverSupportLevel
enum and replace it with NO_CARRIER_DETECT and
NO_WIRELESS_SCAN
* panel-applet/NMWirelessApplet.[ch]
- Merge essid.glade -> wireless-applet.glade
- Implement the "Your driver sucks" notification dialog
* panel-applet/NMWirelessAppletDbus.c
- Change stuff from getSupportsCarrierDetect->getDriverSupportLevel
- Grab hardware address for each device from NM too
- Check whether the driver for each device sucks or not whenever
a new device is noticed
* panel-applet/NMWirelessAppletOtherNetworkDialog.c
- Deal with stuff being in wireless-applet.glade now rather than essid.glade
* src/NetworkManager.c
- Fix a double-unref on device removal
* src/NetworkManagerUtils.c
- Set appropriate driver support level on a device that doesn't
support scanning or carrier detection
* src/nm-dbus-device.c
- New "getHWAddress" dbus method on devices
- getSupportsCarrierDetect -> getDriverSupportLevel
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@534 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c
- (nm_poll_and_update_wireless_link_state): make code less indented
Patch from Bill Moss:
* src/NetworkManager.c
- (nm_device_update_link_state): Update signal strength on wireless
devices every time we update link state too.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@531 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (nm_device_set_essid): Work around Orinoco cards which need
extra time after setting the ESSID
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@530 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (nm_device_set_up_down): remove check for unsupported devices
that caused NM to not bring devices up when they were
added to the device list.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@523 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDevice.c
- (mdio_read): Fix two bugs that caused all devices to fail
the MII carrier detection support checks
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@514 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* panel-applet/NMWirelessApplet.c
- (nmwa_about_cb): Add some more contributors
- (nmwa_update_state): show the applet when there's no connection
- Enable the "Stop/Resume all wireless devices" option in the
context menu
- New "no connection" icon
* src/NetworkManager.c
- (nm_poll_and_update_wireless_link_state): don't do anything if
wireless is disabled or we're asleep
* src/NetworkManagerDHCP.c
- Remove trailing "\n" on debug messages
* src/NetworkManagerDbus.c
- (nm_dbus_network_status_from_data): new state "asleep"
* src/NetworkManagerDevice.c
- Merge most of Peter Jones' "completion" patch that greatly reduces
latency and wait times for most operations
- (nm_device_wireless_scan): Don't scan when asleep
* src/NetworkManagerPolicy.c
- (nm_policy_get_best_device): return no device when asleep
- (nm_policy_allowed_ap_list_update): From Bill Moss: merge properties
for all wireless devices on update, not just active device
* src/NetworkManagerUtils.c
- Merge Peter Jones' "completion" patch
* src/nm-dbus-nm.c
- (nm_dbus_nm_set_wireless_enabled): bring down wireless devices when
we're told to disable them
- (nm_dbus_nm_sleep, nm_dbus_nm_wake): new functions for sleep/wake
* utils/nm-utils.h
- New variants of the warn/info/error/debug print functions that can take
variables rather than static strings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@510 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerUtils.c
- (nm_get_device_driver_name): driver names are now on the parents of
"Network Interface" objects, so look for them there
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@509 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* dhcpcd/dhcpcd.[ch]
src/NetworkManagerDHCP.c
- Switch names from "*_record_*" -> "*_element_*" to clarify things a bit
(ie, dhcp_option_record_len -> dhcp_option_element_len)
* src/NetworkManagerDbus.c
- spacing cleanups
* src/nm-dbus-dhcp.c
- Make the API suck less. There is now only 1 type of each function,
ie only "getInteger" and no longer also "getIntegerv". All types
are returned encapsulated in a DBUS_TYPE_ARRAY, even for options
that will never have more than 1 element. This should simplify
things greatly.
* test/nm-dhcp-opt-test.c
- Make the tool not segfault
- adapt to new DHCP Options API
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Tom Parker:
* src/nm-netlink-monitor.c
- Include unistd.h
* info-daemon/NetworkManagerInfoDbus.c
- (nmi_dbus_update_network_auth_method): free GConf values
Patch from Nathaniel McCallum <npmccallum@gentoo.org>:
* src/NetworkManagerDevice.c
- (nm_device_set_wireless_config): wait for successful
association longer for some cards (Atheros a/b/g)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@502 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManagerDbus.c:
Fix some sign weirdness that gcc4 doesn't like,
and add a header file so PPC can hopefully find
SIGTRAP
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@499 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fix a few -Wall -Werror warnings
* info-daemon/NetworkManagerInfo.c:
(main): remove unused loop variable.
* info-daemon/NetworkManagerInfoDbus.c:
(nmi_dbus_nm_is_running): comment out
unused static function
* src/nm-netlink-monitor.c:
(receive_pending_bytes):
initialize output variables to NULL/0,
on function failure (Problem pointed out
by Bryan Clark).
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@498 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Fourth (probably working) cut at porting to
dbus 0.30 api and new hal. This cut adds
some new logging macros to make debugging
easier.
* dispatcher-daemon/NetworkManagerDispatcher.c:
* info-daemon/NetworkmanagerInfo.c:
* info-daemon/NetworkManagerInfoPassphraseDialog.c:
* info-daemon/NetworkManagerInfoVPN.c:
* src/NetworkManager.c:
* src/NetworkManagerAP.c:
* src/NetworkManagerAPList.c:
* src/NetworkManagerDHCP.c:
* src/NetworkManagerDbus.c:
* src/NetworkManagerDevice.c:
* src/NetworkManagerPolicy.c:
* src/NetworkManagerSystem.c:
* src/NetworkManagerUtils.c:
* src/NetworkManagerWireless.c:
* src/autoip.c:
* src/nm-dbus-nm.c:
* src/backends/NetworkManagerDebian.c:
* src/backends/NetworkManagerGentoo.c:
* src/backends/NetworkManagerRedHat.c:
* src/backends/NetworkManagerSlackware.c:
use new logging macros.
* dispatcher-daemon/NetworkManagerDispatcher.c:
(nmd_dbus_filter): s/dbus_free/g_free/
* info-daemon/Makefile.am: link in utils library.
* info-daemon/NetworkmanagerInfo.c: use new logging
macros.
(nmi_dbus_get_network): don't assume enumerations
are 32-bit.
(nmi_dbus_nmi_message_handler): don't free what
doesn't belong to us.
* libnm_glib/libnm_glib.c:
(libnm_glib_get_nm_status):
(libnm_glib_init): don't free what doesn't
belong to us.
(libnm_glib_dbus): strdup result, so it doesn't get
lost when message is unref'd.
* panel-applet/NMWirelessAppletDbus.c:
(nmwa_dbus_update_devices): s/dbus_free/g_free/
* src/NetworkManager.c:
(nm_monitor_wired_link_state): request initial status
dump of all cards when we start up, instead of relying
on /sys/.../carrier.
(nm_info_handler), (nm_set_up_log_handlers):
log handlers to specify what syslog priorites
the logging macros default to.
* src/NetworkManagerAPList.c:
(nm_ap_list_populate_from_nmi):
s/dbus_free_string_array/g_strfreev/
* src/NetworkManagerDbus.c:
(nm_dbus_get_network_object):
validate d-bus message argument types.
Advance message iterator after reading argument,
prepend instead of append to GSList.
* src/NetworkManagerDevice.c:
(nm_device_probe_wired_link_status):
remove redundant /sys in /sys path. remove wrong
contents == NULL means has carrier assumption.
* src/nm-netlink-monitor.c
(nm_netlink_monitor_request_status): implement
function to ask kernel to dump interface link
status over netlink socket.
* test/*.c: s/dbus_free/g_free/
* utils/nm-utils.h:
(nm_print_backtrace): new macro to print backtrace.
(nm_get_timestamp): new macro to get sub-second precise
unix timestamp.
(nm_info), (nm_debug), (nm_warning), (nm_error):
new logging functions. nm_info just prints,
nm_debug includes timestamp and function,
nm_warning includes function, nm_error includes
backtrace and sigtrap.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@497 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Third (unfinished, partially working) cut at porting to
dbus 0.30 api and new hal.
* info-daemon/NetworkManagerInfoDbus.c:
don't free null arrays.
* panel-applet/NMWirelessAppletDbus.c:
* src/nm-dbus-device.c:
* src/nm-dbus-net.c:
* src/NetworkManagerDbus.c: more
STRING -> OBJECT_PATH fun
* src/NetworkManagerDevice.c:
* src/NetworkManagerDevice.h:
(rename nm_device_get_link_active): rename to
nm_device_has_active_link
(nm_device_wireless_link_active): rename to
nm_device_probe_wireless_link_state
(nm_device_wired_link_active): rename to
nm_device_probe_wired_link_state. Rewrite to
use carrier file since hal doesn't maintain
link state anymore.
(nm_device_update_link_active): rename to
nm_device_update_link_state
* src/NetworkManagerPolicy.c
(nm_policy_activation_finish): check for NULL
MAC address.
* src/Makefile.am:
* src/NetworkManagerMain.h:
* src/NetworkManager.c:
* src/nm-netlink-monitor.c:
* src/nm-netlink-monitor.h: New class to support
monitoring wired ethernet link status, since HAL
doesn't export that information anymore.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@495 4912f4e0-d625-0410-9fb7-b9a5a253dbdc