summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ifcfg-rh: accept IPv6 routes without "via" in route6 file (bgo #697525)jk/ifcfg-rh-route6-bgo697525Jiří Klimeš2014-06-103-49/+35
| | | | | | | Routes without nexthop are legal and should be treated as a device route (direct route). https://bugzilla.gnome.org/show_bug.cgi?id=697525
* contrib/rpm: update NetworkManager description in spec fileJiří Klimeš2014-06-091-4/+5
| | | | Text by dcbw.
* libnm-util: don't append NULL in g_string_append()Jiří Klimeš2014-06-091-2/+2
|
* examples: fix get-active-connections-dbus-glib.c exampleJiří Klimeš2014-06-091-45/+18
|
* trivial: typo in the NEWSJiří Klimeš2014-06-091-1/+1
|
* platform: pass optional padding to _rebase_relative_time_on_now()Thomas Haller2014-06-071-10/+12
| | | | | | | | | | | | | | _rebase_relative_time_on_now() is used both by _address_get_lifetime()/nm_platform_ip[46]_address_sync() and the to_string() functions. In the latter case, we want to print the original value, without padding. Otherwise in the addresses are printed in the logs with an additional 5 seconds padding, which is confusing. For adding addresses in platform however, we still want to keep the padding. So pass it on as additional parameter. Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-glib: don't use deprecated nm_access_point_get_hw_address()Thomas Haller2014-06-072-2/+2
| | | | | | | | | nm_access_point_get_hw_address() is already deprecated since pre-0.9.0-beta3 (f30e15a04d56a922f50e20c3c155a452d635a187). However, it also is defined as NM_DEPRECATED_IN_0_9_10, because there are no deprecated macros for previous version. Signed-off-by: Thomas Haller <thaller@redhat.com>
* platform: fix setting preferred time off-by-one in _init_ip_address_lifetime()Thomas Haller2014-06-071-1/+1
| | | | | | | This error was introduced only recently with commit 8310a039d81e3a316cf657aa9f28edabb9be125c. Signed-off-by: Thomas Haller <thaller@redhat.com>
* release: bump version to 0.9.11.0 (development)Thomas Haller2014-06-071-2/+2
|
* release: bump version to 0.9.9.95 (0.9.10-beta1)0.9.9.950.9.10-beta1Dan Williams2014-06-061-1/+1
|
* release: update NEWSDan Williams2014-06-061-0/+56
|
* libnm-glib-vpn: bump soname (1.1.0 -> 1.2.0) for API additionsDan Williams2014-06-061-1/+1
|
* libnm-glib: bump soname (4.7.0 -> 4.8.0) for API additionsDan Williams2014-06-061-1/+1
|
* libnm-util: bump soname (2.5.0 -> 2.6.0) for added APIDan Williams2014-06-061-1/+1
|
* dispatcher: don't warn on non-critical missing directory errorDan Williams2014-06-061-1/+1
|
* build: create dispatcher directories pre-down.d and pre-up.dThomas Haller2014-06-072-0/+4
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util: fix an error noticed by coverityDan Williams2014-06-061-1/+1
|
* cli: fix a couple errors noticed by coverityDan Williams2014-06-061-23/+26
|
* core: suppress missing MAC address warning during connection matchingDan Williams2014-06-061-3/+6
| | | | One of the connetions may not have a MAC address, so don't expect one.
* cli: fix error parsing input arguments in non-interactive modeThomas Haller2014-06-061-2/+4
| | | | | | | | | | | | | | Causes the following failure: $ /bin/nmcli connection add type ethernet con-name connie ifname '*' (process:13883): GLib-CRITICAL **: g_strchug: assertion `string != NULL' failed (process:13883): GLib-CRITICAL **: g_strchomp: assertion `string != NULL' failed Error: invalid connection type; '' not among [generic, ...]. Regression introduced by commit bfb1200b4f279f83c113d048839044ad51ca2af7. Signed-off-by: Thomas Haller <thaller@redhat.com>
* build: update gitignore file after renaming nm-dispatcher.action executable ↵Thomas Haller2014-06-061-1/+1
| | | | | | to nm-dispatcher Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: fix lag in NMManager:state moving to CONNECTED_GLOBALDan Winship2014-06-061-0/+20
| | | | | | | | | | | | Something changed at some point so that NMManager was now recomputing its state after a connection was activated, but before NMPolicy had decided whether to give that connection the default route, meaning NMManager would set the state to CONNECTED_LOCAL rather than CONNECTED_GLOBAL. Fix this by watching the active connection :default and :default6 properties too, so we do the right thing regardless of what order the AC properties change in.
* merge: add blocking dispatcher pre-up and pre-down events (bgo #387832)Dan Williams2014-06-0621-2738/+3044
|\ | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=387832 https://bugzilla.redhat.com/show_bug.cgi?id=1048345 https://bugzilla.redhat.com/show_bug.cgi?id=982734
| * dispatcher: bump overall timeout to 10 minutes (rh #982734) (rh #1048345)Dan Williams2014-06-062-3/+7
| | | | | | | | | | Since NM now handles long-running dispatcher scripts better, allow them to run for really long times.
| * dispatcher: don't use NULL error domainsDan Williams2014-06-061-11/+11
| | | | | | | | | | glib doesn't like it, plus we don't use the error anyway, so just return the constant error string.
| * dispatcher: enhance debug loggingDan Williams2014-06-061-34/+52
| | | | | | | | | | | | Attach a request ID to every request, and print that out in the debug messages so you can see which results match up with which dispatcher requests.
| * dispatcher: use separate directories for pre-up/pre-down eventsDan Williams2014-06-064-31/+124
| | | | | | | | | | | | To ensure that NetworkManager does not block needlessly for events which have no scripts, require scripts that respond to blocking events to opt into the action.
| * core: block on dispatcher scripts when quittingDan Williams2014-06-063-16/+60
| | | | | | | | | | Like VPN connections, block on dispatcher scripts when quitting. Since the event loop is no longer running we can't schedule callbacks.
| * core: implement PRE_UP dispatcher actionsDan Williams2014-06-061-5/+35
| |
| * core: implement PRE_DOWN dispatcher actions (bgo #387832)Dan Williams2014-06-061-2/+39
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=387832
| * vpn: implement PRE_UP dispatcher actionsDan Williams2014-06-061-13/+38
| |
| * vpn: make DOWN dispatcher action block on quitDan Williams2014-06-061-9/+18
| | | | | | | | | | | | Since the event loop isn't running on quit, but we want to ensure that scripts can fully process the DOWN event, block on scripts completing when disconnecting the VPN when quitting.
| * vpn: implement PRE_DOWN dispatcher actions (bgo #387832)Dan Williams2014-06-064-49/+77
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=387832
| * dispatcher: convert action_to_string to a tableDan Williams2014-06-061-27/+16
| | | | | | | | | | Oddly, this increases the compiled+stripped size of the object file by 24 bytes (8296 -> 8320), but I think it produces more readable code.
| * dispatcher: add PRE_UP statesDan Williams2014-06-062-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This event runs before a connection/device is announced as "activated" or "connected", to enable scripts to do things before applications begin using connectivity. For example, this could be used to manage /etc/resolv.conf outside of NetworkManager and ensure that resolv.conf had correct information before DNS is used. Note that this is different than the Debian or Gentoo "pre-up" event used in /etc/network/interfaces, as that event runs before any L2 configuration has started. If we really need an event like that, we'll add it later as "lower-up".
| * dispatcher: robustify canceling dispatcher callsDan Williams2014-06-062-24/+51
| | | | | | | | | | | | | | | | Thomas pointed out that using the address of the DispatcherInfo structure as the dispatcher call ID could cause a mis-cancelation if malloc re-used the same block in the future. While the code should be correctly clearing call IDs after the callback runs or is canceled, just use numeric IDs to avoid potential crashses.
| * dispatcher: add synchronous dispatcher callsDan Williams2014-06-065-113/+274
| | | | | | | | | | | | On shutdown we can't defer the response to a callback, so we need to use synchronous D-Bus calls. Second, sometimes we want to block on the dispatcher response, like for pre-down.
| * dispatcher: only dispatch if scripts existDan Williams2014-06-065-2/+62
| | | | | | | | | | | | If there are no dispatcher scripts, don't bother dispatching any events. This saves some time configuring networking if the event would have no effect anyway.
| * dispatcher: rename executable to 'nm-dispatcher'Dan Williams2014-06-069-12/+12
| |
| * core: don't do anything interesting in NMDevice dispose()Dan Williams2014-06-063-49/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NMDevice dispose() function contained some badly-duplicated logic about when to deactivate a device on its last ref. This logic should only run when the device is removed by the manager, since the manager controls the device's life-cycle, and the manager knows best when to clean up the device. But since it was tied to the device's refcount, it could have run later than the manager wanted, or not at all. It gets better. Dispose duplicated logic that was already done in nm_device_cleanup(), and then *called* nm_device_cleanup() if the device was still activated and managed. But the manager already unmanages the device when removing it, which triggers a call to nm_device_cleanup(), takes the device down, and resets the IPv6 sysctl properties, which dispose() duplicated too. So by the time dispose() runs, the device should already be unmanaged if the manager wants to deconfigure it, and most of the dispose() code should be a no-op. Clean all that up and remove duplicated functions. Now, the flow should be like this: 1) manager decides to remove the device and calls remove_device() 2) if the device should be deconfigured, the manager unmanages the device 3) the NMDevice state change handler tears down the active connection via nm_device_cleanup() and resets IPv6 sysctl properties 4) when the device's last reference is finally released, only internal data members are freed in dispose() because the device should already have been cleaned up by the manager and be unmanaged 5) if the device should be left running because it has an assumable connection, then the device is not unmanaged, and no cleanup happens in the state change handler or in dispose()
| * core: consolidate generic device cleanup tasksDan Williams2014-06-061-105/+90
| | | | | | | | | | dispose() and nm_device_cleanup() both do common tasks; consolidate these common tasks in one place and call when appropriate.
| * core: (trivial) some NMDevice dispose/finalize cleanupsDan Williams2014-06-061-6/+11
| | | | | | | | | | | | | | Ensure autoip4 is cleaned up when disposing, like we clean up DHCP. Move things that only free stuff to finalize(), and move things that unref stuff to dispose (eg, the Firewall Manager stuff).
| * core: fix deactivation of assumed connections on device removal (bgo #729833)Dan Williams2014-06-061-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following procedure leaves an NMActiveConnection around for a deactivated device, which causes errors in libnm-glib clients when they cannot create the GObject for the non-existent device of the AC. 1) allow a device which can assume connections to be activated 2) stop NM, which should leave the device's IP configuration up 3) start NM and allow it to assume the device's existing connection 4) remove the device, either by unplugging it or 'rmmod' The device is removed by nm-manager.c::remove_device(), but the device object is not moved to UNMANAGED state, leaving the NMActiveConnection completely unaware the device has gone away. The nm-manager.c::remove_device() code did not correctly handle moving a forcibly removed (eg, by unplugging or 'ip link del' or 'rmmod') device to the UNMANAGED state when the device was active with an assumed connection. To fix this, make the conditions when the device should be deactivated on removal much more explicit. A device should be deactivated on removal if: 1) it is forcibly removed, eg by the kernel network interface being removed due to 'ip link del' or hotplugging, or internally by NM due to a parent WWAN interface taking priority over a WWAN ethernet interface 2) if the device cannot assume connections, in which case NetworkManager must have activated the device and since we cannot assume the connection on restart, we should deactivate it 3) if the device is not activated, to ensure that its IPv6 parameters and other things get reset to the pre-NetworkManager values https://bugzilla.gnome.org/show_bug.cgi?id=729833
| * core: simplify DHCP cleanupDan Williams2014-06-061-16/+7
| | | | | | | | | | | | | | | | | | | | | | dhcp6_cleanup() frees priv->dhcp6_ip6_config so dispose() doesn't need to do that. Also use g_clear_object() when appropriate. Lastly, notify that the DHCP4/6 config objects have changed *after* clearing them, so that the PropertiesChanged signal is emitted with a blank path to indicate the object is gone. Previously the PC signal would have been emitted with the valid path of the DHCP4/6 config object, but the object would already be dead.
| * trivial: simplify nm_device_set_is_nm_owned()Dan Williams2014-06-063-17/+6
| | | | | | | | Nothing used its return value or passed FALSE.
| * core: rearrange and remove some NMDevice gettersDan Williams2014-06-062-62/+42
| | | | | | | | | | | | | | For any function in nm-device.h which is not used outside of nm-device.c, remove the public prototypes. Functions that are actually used get moved above their caller, and functions that have no callers are removed.
| * core: let NMDevice export itselfDan Williams2014-06-063-12/+9
| | | | | | | | Saves some code and a memory allocation.
| * core: clean up NMDevice simple getters/settersDan Williams2014-06-062-110/+71
| | | | | | | | | | Group most of the simple getters together near the top, and remove getters that have no callers (mtu, firmware-version).
| * trivial: re-organize IPv6 /proc property util functionsDan Williams2014-06-061-42/+42
| |
| * core: refactor state/reason string functions to use static tablesDan Williams2014-06-061-152/+84
| |