summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: don't default to -Werrorlr/ancient-ubuntuLubomir Rintel2015-06-023-3/+3
| | | | | | | | | | It seems like a poor default for various downstream toolchains. We can't anticipate the compiler warnings for future compiler versions and older ones are prone to false positives. Also, older gdbus-codegen is known to generate code that triggers compiler warnings. Let's keep it enabled for maintainer builds and distcheck so that we're sure a tool chain that builds releases without warnings exists.
* build: don't abort configure if there's no systemd devel headersLubomir Rintel2015-06-021-3/+10
| | | | Just disable systemd-logind session tracking instead.
* tests: avoid calling GLib.IOChannel.unix_new()Lubomir Rintel2015-06-021-1/+1
| | | | | The Ubuntu 12.04 introspection data don't contain it. However, the default constructor works just well and even looks a bit more Python-y.
* libnm-core,libnm-util: avoid calling a constructorLubomir Rintel2015-06-022-2/+14
| | | | | | It yields completely unpredictable results on Ubuntu 12.04 (the global variable successfully comparing to NULL despite demonstrably not NULL). Possibly a toolchain bug.
* systemd-dhcp: fix build with Linux 3.2.0 headersLubomir Rintel2015-06-021-0/+5
| | | | | | | | | Fixes build on Ubuntu 12.04. systemd/src/libsystemd-network/dhcp-network.c: In function '_bind_raw_socket': systemd/src/libsystemd-network/dhcp-network.c:75:17: error: 'BPF_XOR' undeclared (first use in this function) systemd/src/libsystemd-network/dhcp-network.c:75:17: note: each undeclared identifier is reported only once for each function it appears in make[4]: *** [libsystemd_nm_la-dhcp-network.lo] Error 1
* ppp-manager: fix build with Linux 3.2.0 headersLubomir Rintel2015-06-021-0/+1
| | | | | | | | Fixes build with Ubuntu 12.04. In file included from ppp-manager/nm-ppp-manager.c:42:0: /usr/include/linux/if_ppp.h:103:16: error: field 'b' has incomplete type /usr/include/linux/if_ppp.h:108:21: error: field 'b' has incomplete type
* build: use compat version of g_clear_pointer()Lubomir Rintel2015-06-025-0/+9
| | | | Ubuntu 12.04 has an ancient version of glib, which we nevertheless support.
* core: don't assume the loopback interface is called "lo"Lubomir Rintel2015-06-011-1/+1
| | | | | I did a "ip link set lo name yolo" and now my NetworkManager triggers an assertion failure. :( Nevertheless, the loopback interface is always ifindex=1.
* platform-linux: allow netlink messages from non-privileged user namespacesLubomir Rintel2015-06-011-3/+2
| | | | Just check they're from kernel.
* build: rename file "include/nm-utils-internal.h" to "nm-macros-internal.h"Thomas Haller2015-06-0114-16/+16
| | | | | | | | | | | We already have "nm-utils*.h" and "NetworkManagerUtils.h" headers. Rename "include/nm-utils-internal.h" to "nm-macros-internal.h". I think that name is better, because this file is header-only, internal, and repository-wide. Also, it will never contain non-header-only declarations because there is no backing object file under "include/". It will only contain macros and inline functions.
* utils: move NM_FLAGS_*() macros to header file "include/nm-utils-internal.h"Thomas Haller2015-05-292-9/+10
|
* default-route: merge branch 'th/default-route-fixes-rh1205405'Thomas Haller2015-05-293-21/+69
|\ | | | | | | | | | | | | Two improvements for handling default-routes. https://bugzilla.redhat.com/show_bug.cgi?id=1224291 https://bugzilla.redhat.com/show_bug.cgi?id=1205405
| * default-route: also configure default-routes for assumed connectionsThomas Haller2015-05-291-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously for assumed connections we would never configure a default route. That has serious problems for example in the following two scenarios: - the default-route might have a limited lifetime from a previous SLAAC/accept_ra setting. In this case, once we assume the connection we must also ensure that we extend the lifetime of the default route. - the gateway could be received via DHCP/RA and it might change. If we ignore default-routes for assumed connection we miss that change. The problem is that the notion of "assumed connection" wrongly combines two conflicting goals (related bug bgo#746440): a) have an external device that is entirely unmanged by NM. b) do a seamless takeover of a previously managed connection at start, but still fully manage. This patch changes the handling of default-routes towards meaning b). https://bugzilla.redhat.com/show_bug.cgi?id=1224291
| * default-route: for devices with 'never-default' enforce the default-route ↵Thomas Haller2015-05-291-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only once Since da708059dabb2854d11eed1a403398327b31535b, we would pickup the default-route as configured externally, except at those moments when NM re-applys the IP configuration of the interface, such as during a DHCP lease. That allows the user to add/remove the default-route externally (iproute). But still, at random times (DHCP lease), we will revert those external changes. Extend this, that if the connection is explicitly configured as 'never-default=yes', that it tells NM not to interfere with externally added default-routes on this device. That means, NM will only remove any preexisting default-routes when configuring the device a first time. On any later attempts, NM will assume whatever is configured there. That makes sense because the user indicated not wanting NM to manage a default-route on that device, so if something externally added a default-route, assume that is what the user wants. This only affects non-assumed connections, with 'never-default=yes'. https://bugzilla.redhat.com/show_bug.cgi?id=1205405
| * default-route: add @out_is_never_default argument to has_default_route()Thomas Haller2015-05-293-18/+28
|/ | | | | | Also accept a NULL connection in nm_default_route_manager_ip4_connection_has_default_route() and nm_default_route_manager_ip6_connection_has_default_route().
* merge: increase 'max_replies_per_connection' limit in D-Bus configurationJiří Klimeš2015-05-292-0/+11
|\ | | | | | | | | The limit seems to be too low and causes problems in libnm-glib. We increase the limit and warn in libnm-glib if it was exceeded.
| * libnm-glib: print a bold warning about reaching a D-Bus limitJiří Klimeš2015-05-291-0/+9
| | | | | | | | | | This causes incorrect application behaviour, so libnm-glib should warn at least.
| * dbus: increase 'max_replies_per_connection' limit in D-Bus configurationJiří Klimeš2015-05-291-0/+2
|/ | | | | | | | | | | | | | | | | | | D-Bus default limit of replies per connection has been lowered to 128 due to CVE-2014-3638, see: http://cgit.freedesktop.org/dbus/dbus/commit/?id=5bc7f9519ebc6117ba300c704794b36b87c2194b https://bugs.freedesktop.org/show_bug.cgi?id=81053 The limit seems to be too low and causes problems in libnm-glib, that will not return all NetworkManager connection profiles if there are too many of them (roughly more than the limit). As a consequence, libnm-glib based clients will not work properly. Lets increase the limit in our D-Bus org.freedesktop.NetworkManager.conf configuration as we had it before. See also older commit d5b31d55fa1536a5bd08cf85929ac63a8f723467 that did the opposite thing (removing the limit because the default D-Bus limit was 8192 at that time).
* builds: only enable TAP driver for glib >= 2.37.6Lubomir Rintel2015-05-2818-35/+5
| | | | | No TAP support for previous versions and --tap argument is silently ignored, confusing the TAP driver.
* nm-import-openvpn: import 'float' OpenVPN optionJiří Klimeš2015-05-281-0/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=737108 Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
* build: support runstatedir configure optionPavel Šimerda2015-05-284-4/+9
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=737139 [thaller@redhat.com: modified original patch]
* merge: offer valid values for enum-style properties in nmcli (rh #1034126)Jiří Klimeš2015-05-285-93/+219
|\ | | | | | | | | | | | | | | | | | | Values for enumeration-style properties are displayed when setting a property, and also TAB-completion offers the values. Later, we plan to improve the handling even more by adding meta-data to libnm. That would enable offering yes/no values, for example. https://bugzilla.redhat.com/show_bug.cgi?id=1034126
| * cli: TAB-completion for enum-style property values (rh #1034126)Jiří Klimeš2015-05-281-45/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Valid values for enumeration-style properties are offered in TAB-completion in the editor. Thus the user has a quick overview of the possible values and can edit properties more easily. Example: $ nmcli con edit type wifi nmcli> set wifi-sec.group <TAB> ccmp tkip wep104 wep40 nmcli> ... https://bugzilla.redhat.com/show_bug.cgi?id=1034126
| * cli: add missing nmc_property_802_1X_allowed_eap() functionJiří Klimeš2015-05-281-2/+5
| |
| * cli: change function for allowed values to return array of stringsJiří Klimeš2015-05-283-39/+28
| |
| * cli: add @brackets parameter to nmc_util_strv_for_displayJiří Klimeš2015-05-283-5/+7
| |
| * cli: print valid-values hint in property menu for empty "set" commandJiří Klimeš2015-05-281-2/+9
|/ | | | | | nmcli 802-11-wireless.mode> set Allowed values for 'mode' property: infrastructure, adhoc, ap Enter 'mode' value:
* core/cli: add missing device state-reason to string conversionsJiří Klimeš2015-05-272-0/+8
| | | | | | | for NM_DEVICE_STATE_REASON_PARENT_CHANGED and NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED Fixes: cd3df12c8f8ed6c868c12bc4e7fe6ba162dafc5b
* device: log the device we were searching in udevJiří Klimeš2015-05-271-3/+5
|
* Partially revert "dhcp: gracefully recover from failed DHCP BOUND state ↵Dan Williams2015-05-261-2/+2
| | | | | | | | | transitions (bgo #743700)" This reverts commit 7daf63461de4195b1626ca15f835fc7cbc56e847. Turns out the removal of the second set of [] in configure.ac causes the command to be wrong in 'configure' and the test to be incorrect.
* ifnet/test: rename test check_ifnet to test-ifnetThomas Haller2015-05-263-7/+7
| | | | | | All our other test binaries are named "test-*" so rename this one too. Also we gitignore "test-*.log" files, but didn't ignore "check_ifnet.log".
* libnm-glib: do not access NULL GError variable (rh #1224819)Jiří Klimeš2015-05-261-4/+6
| | | | | | | dbus_g_proxy_call() should set GError if returning FALSE. But apparently there is a bug in dbus-glib and the error can be NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1224819
* test: fix running valgrind tests with NMTST_NO_VALGRINDThomas Haller2015-05-261-1/+1
| | | | Fixes: 6463ce5dd9ffc1aae3ca9ddc4dac4e25fd815237
* ifnet/tests: convert to GLib test functionsBeniamino Galvani2015-05-262-151/+92
|
* ifnet/tests: fix GCC 5 warning about possible misuse of logical notBeniamino Galvani2015-05-261-1/+1
| | | | | | | | | | | | | | | | With GCC 5, -Wlogical-not-parentheses is enabled by -Wall and warns about suspicious code like: int a; ... if (!a > 1) { ... } Fix the following warning: test_all.c: In function ‘test_is_static’: test_all.c:114:32: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] ASSERT (!is_static_ip6 ("eth0") == TRUE, "is static", ^
* libnm,dbus-helpers: include glib-compat for g_test_initialized()Lubomir Rintel2015-05-261-0/+2
|
* merge: branch 'lr/tap-tests' (bgo #749375)Lubomir Rintel2015-05-2632-214/+243
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=749375
| * tests: don't try to connect to the private socketlr/tap-testsLubomir Rintel2015-05-261-2/+3
| | | | | | | | | | Even if we're running the tests as root we still want to use the mock service instead of whatever version of daemon runs on the test host.
| * tests: be a bit more helpful when valgrind tests failLubomir Rintel2015-05-261-1/+13
| |
| * tests: use the TAP formatterLubomir Rintel2015-05-2619-3/+37
| | | | | | | | The test results in standard format are easily integrated into CI systems.
| * build: switch to parallel test harnessLubomir Rintel2015-05-264-17/+6
| | | | | | | | This will make it possible to use the TAP formatter.
| * tests: call g_test_run() even when skipping the testLubomir Rintel2015-05-263-5/+2
| | | | | | | | | | It will return the 77 exit code itself. For TAP output it will also generate the proper test skip marker.
| * tests: always spawn private d-busLubomir Rintel2015-05-263-15/+9
| | | | | | | | Parallel test runs would not be possible without this.
| * tests: move all asserts into testsLubomir Rintel2015-05-266-171/+173
|/ | | | Otherwise the TAP formatter would produce a plan-less output.
* dns: fall back to writing resolv.conf when other methods are not availableBeniamino Galvani2015-05-261-30/+46
| | | | | | | | | | | | | | | | | After commits: de0d623680d7 dns: don't fall back to other methods when resolvconf or netconfig fail e573977b8084 dns: allow runtime selection of resolv.conf manager the method used to write /etc/resolv.conf is specified by a configuration parameter and NM doesn't try other methods if the chosen one has not success. Restore the fallback to the 'none' method if resolvconf or netconfig executables are not available, so that when the value of 'rc-manager' is misconfigured the system continues to work properly. https://bugzilla.gnome.org/show_bug.cgi?id=749286
* po: update Occitan (oc) translation (bgo #749754)Cédric Valmary2015-05-251-89/+6395
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=749754
* test: include "nm-keyfile-internal.h" for tests under src/Thomas Haller2015-05-201-1/+3
| | | | | | Including "nm-keyfile-internal.h" before "nm-test-utils.h" enables a few useful utilities. If we know that our test uses NetworkManagerUtils.h, we can always include it -- as we have libnm-core available.
* libnm/test: include "nm-keyfile-internal.h" in test-general.cThomas Haller2015-05-201-0/+1
| | | | | This enables special code in "nm-test-utils.h" that is useful for tests.
* libnm: fix libnm.ver by putting new symbols into appropriate sectionThomas Haller2015-05-201-6/+6
| | | | Fixes: 019943bb5d9efea52392610b207dececafa6fdb3
* libnm: enforce that "nm-utils-private.h" header is not used inside src/Thomas Haller2015-05-202-0/+8
| | | | Let "nm-utils-private.h" and "nm-types.h" conflict.