summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* config: add support for reloading of configurationth/rh1066697_reload_config-dcbw-1dcbw/configThomas Haller2014-08-145-57/+218
| | | | | | | | | | Some configuration parameters can be set via command line. If a parameter is set from command line, the original value from command line will still be preserved after reloading. (heavily modified by dcbw) Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: add handler for supported signalsThomas Haller2014-08-141-1/+15
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* config: back NMConfig with NMConfigDataDan Williams2014-08-145-119/+74
|
* config: add new config data method that merges other configDan Williams2014-08-142-0/+98
|
* config: add most properties to NMConfigDataDan Williams2014-08-142-11/+253
|
* config: add new NMConfigData classThomas Haller2014-08-143-0/+247
| | | | | | | | | | | | | | | A NMConfig instance is immutable and it's properties do not change, with one exception: the NMConfigData property. The NMConfigData instance itself is also immutable and does not change, with one exception: the NMConfig parent reference will be set to NULL when the config gets disposed. NMConfigData only holds a weak reference to the NMConfig. When reloading a configuration, NMConfig will only swap the NMConfigData instance. Signed-off-by: Thomas Haller <thaller@redhat.com>
* contrib/rpm: fix --quick option of build_clean.shThomas Haller2014-08-141-0/+2
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* build: fix generate-setting-docs.py to work with python3Thomas Haller2014-08-121-3/+5
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: fix build with toolchains not exporting CLOCK_BOOTTIMEPeter Korsgaard2014-08-111-0/+9
| | | | | | | | | E.G. uClibc 0.9.33 and earlier. https://bugzilla.gnome.org/show_bug.cgi?id=734599 Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* dhcp: fix killing wrong process ID on dhclient releaseDan Williams2014-08-082-9/+14
| | | | | | | | The prototype of dhclient_start() changed in 30cdd1248 but that commit didn't update stop() correctly. Clearly treating a gboolean as pid_t isn't going to work. Second, we don't want to watch the child process on DHCP release because we're just going to kill it shortly after.
* libnm-util: don't warn about unrecognized propertiesDan Winship2014-08-081-2/+4
| | | | | | | | | | libnm-util is expected to end up behind the curve in terms of knowing about new NMSetting properties, so if it sees an unknown property, it should just assume that there will also be a backward-compatibility equivalent rather than printing a warning. (In particular, it should not warn when it sees the "ipv4.address-labels" property now that it now longer knows about it.)
* core: fix a warning and a leakDan Winship2014-08-081-1/+2
| | | | | | | | | For devices where we don't set the hardware address at construct time, the first call to nm_device_update_hw_address() was hitting a return-if-fail. Also, when updating the hardware address, we were leaking the old value.
* libnm-glib/test: fix test failure for test-remote-settings-clientThomas Haller2014-08-081-1/+1
| | | | | | | | | Due to behavioral change of test-networkmanager-service.py, the test /remote_settings/remove_connection fails (test_remove_connection() at test-remote-settings-client.c:318). Fixes: 66a34803293e1012d7a1728d503dd64a1d906366 Signed-off-by: Thomas Haller <thaller@redhat.com>
* nmtst: fix memory leak in nmtst_create_minimal_connection()Thomas Haller2014-08-071-1/+3
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutilsDan Winship2014-08-076-257/+342
| | | | | | | | | | | Rather than having test-crypto and test-setting-8021x be programs that you have to pass arguments to to get them to run a single test, just have them run all of the tests themselves. This lets us get rid of the big "check-local" rule in Makefile.am and just use TESTS to run everything. https://bugzilla.gnome.org/show_bug.cgi?id=734388
* Merge branch 'libnm-nmobj' (bgo #734228)Dan Winship2014-08-0722-1274/+656
|\
| * libnm: add a test for connection-deleted-while-being-createdDan Winship2014-08-072-19/+78
| | | | | | | | | | | | | | Since NMRemoteSettings doesn't announce new connections until it has fetched their properties, it's possible that a connection could get deleted while we're waiting for it to be created. NMRemoteSettings has code to deal with this, so add a test to make sure that it works.
| * nmtst: add nmtst_create_minimal_connection() functionThomas Haller2014-08-071-0/+44
| | | | | | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
| * libnm: fix a g_signal_handler_find() call in NMRemoteSettingsDan Winship2014-08-071-2/+2
| | | | | | | | | | | | | | | | | | NMRemoteSettings was looking for a signal handler on an NMRemoteConnection using only G_SIGNAL_MATCH_FUNC, which means it would get tripped up if a connection was known to two different NMRemoteSettings objects at once. Although that can't happen now, it might in the future if NMRemoteConnection became an NMObject, so use G_SIGNAL_MATCH_DATA too.
| * libnm: remove NMRemoteConnection::updated signalDan Winship2014-08-073-38/+5
| | | | | | | | | | | | | | | | Remove NMRemoteConnection::updated, which since 0.9.10 has been redundant with NMConnection::changed. (We still handle the incoming D-Bus signal, we just don't re-emit it as "updated", since the call to nm_connection_replace_settings() already results in it emitting "changed".)
| * libnm: port NMRemoteSettings to NMObjectDan Winship2014-08-0710-907/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMRemoteSettings duplicates a bunch of NMObject's functionality that it doesn't need to. In libnm-glib, it wouldn't have been possible to port NMRemoteSettings to NMObject without breaking ABI, but now in libnm we can do that. As a side effect of this, NMRemoteSettings gains a "connections" property, and "connection-added" and "connection-removed" signals (with the former replacing the old "new-connection" signal). This also removes the "connections-loaded" signal, since the connections will now always be loaded (via the initialization of the "connections" property) during init()/init_async(). Also, this removes NMRemoteConnection's "removed" signal, since it's redundant with the new NMRemoteSettings::connection-removed (and having the signal on NMRemoteSettings instead is more consistent with other objects).
| * libnm: add NMRemoteConnection:visible propertyDan Winship2014-08-074-28/+68
| | | | | | | | | | Rather than having a private "visible" signal, have a public "visible" property.
| * libnm: remove redundant NM name watching codeDan Winship2014-08-073-139/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NMClient was watching to see whether NetworkManager was running, but its parent class NMObject was already doing that anyway, so NMClient doesn't need to do it itself. This also requires making NMClient:init_async() wait for NMObject's init_async() code to finish before calling GetPermissions, rather than running the two in parallel like before (since we don't know if NM is running or not until after NMObject's init_async() returns). This is probably more correct anyway in terms of inheritance, and it's not as much slower than the original code as it sounds, since previously we were calling NameHasOwner twice (in serial) anyway.
| * libnm: synchronize NMClient and NMRemoteSettings "is NM running" propertiesDan Winship2014-08-0713-112/+112
| | | | | | | | | | Rename NMClient:manager-running and NMRemoteSettings:service-running to both be :nm-running.
| * libnm, libnm-glib: belatedly replace _nm_client_is_object_path()Dan Winship2014-08-072-92/+4
|/ | | | | | | _nm_client_is_object_path() had been copied from g_variant_is_object_path() with a note that it should be replaced when we depended on GLib > 2.24, but it got missed when we actually updated the dependency. Fix it now. (Also fix a nearby typo.)
* Miscellaneous hardware-address-handling changes (bgo #734229)Dan Winship2014-08-0780-636/+583
|\
| * core: update data types of some hwaddr propertiesDan Winship2014-08-0713-152/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have nm_utils_hwaddr_matches() for comparing addresses (even when one is a string and the other binary), there are now places where it's more convenient to store hardware addresses as strings rather than binary, since we want them in string form for most non-comparison purposes. So update for that. In particular, this also changes nm_device_get_hw_address() to return a string. Also, simplify the update_permanent_hw_address() implementations by assuming that they will only be called once. (Since they will.)
| * libnm-core, etc: add nm_utils_hwaddr_matches()Dan Winship2014-08-0726-136/+240
| | | | | | | | | | | | | | Add nm_utils_hwaddr_matches(), for comparing hardware addresses for equality, allowing either binary or ASCII hardware addresses to be passed, and handling the special rules for InfiniBand hardware addresses automatically. Update code to use it.
| * libnm-core: include ETH_ALEN/INFINIBAND_ALEN defines in nm-utils.hDan Winship2014-08-0763-81/+9
| | | | | | | | | | | | | | | | Include <linux/if_ether.h> and <linux/if_infiniband.h> from nm-utils.h, to get ETH_ALEN and INFINIBAND_ALEN, and remove those includes (as well as <net/ethernet.h> and <netinet/ether.h>, and various headers that had been included to get the ARPHRD_* constants) from other files where they're not needed now.
| * all: remove use of struct ether_addr / ether_aton()Dan Winship2014-08-0728-154/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | Lots of old code used struct ether_addr to store hardware addresses, and ether_aton() to parse them, but more recent code generally uses guint8 arrays, and the nm_utils_hwaddr_* methods, to be able to share code between ETH_ALEN and INFINIBAND_ALEN cases. So update the old code to match the new. (In many places, this ends up getting rid of casts between struct ether_addr and guint8* anyway.) (Also, in some places, variables were switched from struct ether_addr to guint8[] a while back, but some code still used "&" when referring to them even though that's unnecessary now. Clean that up.)
| * libnm-core: rewrite nm_utils_hwaddr_ntoa()Dan Winship2014-08-071-6/+6
| | | | | | | | | | Rather than returning from the middle of the loop, just rearrange things so we can exit the loop like normal people.
| * libnm-core, etc: drop type-based hwaddr funcs, port to length-based onesDan Winship2014-08-0732-182/+140
|/ | | | | | | | | | Drop the arptype-based nm_utils_hwaddr funcs, and rename the length-based ones to no longer have _len in their names. This also switches nm_utils_hwaddr_atoba() to using a length rather than an arptype, and adds a length argument to nm_utils_hwaddr_valid() (making nm_utils_hwaddr_valid() now a replacement for nm_utils_hwaddr_aton() in some places, where we were only using aton() to do validity checking).
* logging: merge branch 'th/bgo734230_device_logging'Thomas Haller2014-08-0719-824/+686
|\ | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=734230 Signed-off-by: Thomas Haller <thaller@redhat.com>
| * logging: use new logging macros in NMDevice subclassesth/bgo734230_device_loggingThomas Haller2014-08-0617-811/+637
| | | | | | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
| * logging: extract logging macros for devices to nm-device-logging.hThomas Haller2014-08-063-13/+49
|/ | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* trivial: fix spacing in src/devices/wifi/nm-wifi-ap.hDan Winship2014-08-051-34/+34
| | | | This file had a bad mix of tabs and spaces. Fix it.
* platform/tests: disable platform root test 'test-link-linux' for nowThomas Haller2014-08-041-1/+1
| | | | | | | | | | This test is quite broken and fails often. It does not fail always, but the changes for a failure are high. We certainly should fix that, but for now exclude the test from `make check`. Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util/test: fix tests not to write a core fileThomas Haller2014-08-041-1/+23
| | | | | | | | | | | | | | | | | test_libnm_linking() executes ./test-libnm-linking which is supposed to crash. When the user set `ulimit -c unlimited` before, this will leave a left-over core file. In case of `make distcheck`, this is quite bad because it lets the make target fail: ERROR: files left in build directory after distclean: ./libnm-util/tests/core.31481 Fix this by setting the (soft) rlimit for writing core files to 0 before executing the test binary. Signed-off-by: Thomas Haller <thaller@redhat.com>
* supplicant: fix invalid parameter type in AddBlob D-Bus callGeoffrey Thomas2014-08-041-1/+1
| | | | | | | | | Types passed to dbus-glib need to be GTypes, not D-Bus type. While the DBUS_TYPE_G_* macros are GTypes from libdbus-glib, the other DBUS_ types aren't. Signed-off-by: Geoffrey Thomas <gthomas@mokafive.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util/tests: fix build for older glib with unknown G_SPAWN_DEFAULTThomas Haller2014-08-041-1/+1
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* po: update German (de) translation (bgo #734150)Christian Kirbach2014-08-021-2254/+2643
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=734150 Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: cleanup getting iface for NMDevice for loggingThomas Haller2014-08-021-20/+3
| | | | | | | Since refactoring logging, these calls are not needed. Just forgot to remove them. Signed-off-by: Thomas Haller <thaller@redhat.com>
* build: fix out-of-tree build for libnm-coreThomas Haller2014-08-011-3/+4
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util/test: fix build for clang due to deprecated warningThomas Haller2014-08-011-0/+2
| | | | | | | For clang, we have to include nm-glib-compat.h to redefine G_GNUC_BEGIN_IGNORE_DEPRECATIONS. Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm: Initial merge of "libnm" work (bgo #680675)Dan Winship2014-08-01344-1560/+69655
|\ | | | | | | | | | | | | libnm is the new NetworkManager client library that will replace libnm-util/libnm-glib for NM 1.0. THIS API IS NOT YET STABLE. Don't use it yet.
| * libnm, libnm-utils: error out if mixed libnm/libnm-util symbols are detectedDan Winship2014-08-016-1/+107
| | | | | | | | | | If a program accidentally ends up linking in both libnm and libnm-util (presumably via different dependencies), error out immediately.
| * libnm: add NetworkManager.h, disallow including individual headersDan Winship2014-08-01162-206/+394
| | | | | | | | | | | | | | | | | | | | Add NetworkManager.h, which includes all of the other NM header, and require all external users of libnm to use that rather than the individual headers. (An exception is made for nm-dbus-interface.h, nm-vpn-dbus-interface.h, and nm-version.h, which can be included separately.)
| * libnm: rename NetworkManager.h and NetworkManagerVPN.hDan Winship2014-08-0177-90/+89
| | | | | | | | | | | | | | "NetworkManager.h"'s name (and non-standard capitalization) suggest that it's some sort of high-level super-important header, but it's really just low-level D-Bus stuff. Rename it to "nm-dbus-interface.h" and likewise "NetworkManagerVPN.h" to "nm-vpn-dbus-interface.h"
| * libnm: make the the use of GInitable mandatoryDan Winship2014-08-0144-528/+225
| | | | | | | | | | | | | | | | | | | | | | Remove _nm_object_ensure_inited(), etc; objects that implement GInitable are now mandatory-to-init(). Remove constructor() implementations that sometimes return NULL; do all the relevant checking in init() instead. Make nm_client_new() and nm_remote_settings_new() take a GCancellable and a GError**.
| * libnm: add init_dbus() virtual method to NMObjectDan Winship2014-08-0125-370/+302
| | | | | | | | | | | | | | | | | | | | | | | | Rather than having each object type override constructed() to call _nm_object_register_properties(), have NMObject call a virtual method on the subclass to ask it to register them. Move some code around in nm-client.c and nm-object.c so that all D-Bus-related initialization happens in init_dbus(), and non-D-Bus-related stuff stays in construct(). (This simplifies the next commit.)