summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: add assertion to consistancy of nm_device_check_connection_available()th/more-assertsThomas Haller2015-10-051-16/+51
|
* build: make NM_MORE_ASSERTS define numeric for different levels of more-assertsThomas Haller2015-10-055-6/+20
| | | | | | | | | | | | | Allows to enable more-asserts more granularly. Unfortunately, the old check was "${enable_more_asserts} == "yes", thus we cannot extend "--enable-more-assert=level" because that would mean that the same build script cannot set the option on both old and new NetworkManager. Thus, add a new option --with-more-asserts=level. If you put the following in your build script, it will work as expected whether you build a new or an old version of NetworkManager. ./configure --enable-more-asserts --with-more-asserts=5
* build: include "config.h" in nm*enum-types.c sourcesThomas Haller2015-10-051-1/+1
| | | | | Also include the "config.h" file in the generated sources like "nm-enum-types.c".
* config: add missing include to "config.h" headerThomas Haller2015-10-051-0/+2
|
* build: drop generating empty nm-*-enum-types for device pluginsThomas Haller2015-10-056-40/+3
| | | | | The device plugins adsl, team and wifi were generating empty "nm-*-enum-types" header and source files.
* device: use _LOG() logging macros for per-device loggingThomas Haller2015-10-051-6/+5
|
* libnm: use nm_clear_g_source() in nm-object.cThomas Haller2015-10-031-4/+2
|
* wifi: align logging AP dumpsThomas Haller2015-10-031-1/+1
| | | | | There are several places where we log the APs. It looks nicer in the log, if all use the same length prefix.
* wifi: fix alignment of logging strength in nm_ap_dump()Thomas Haller2015-10-031-2/+1
|
* bus-manager: fix handling of incoming signalsBeniamino Galvani2015-10-031-12/+41
| | | | | | | | | | | | | | | | | | | The 'new-connection' signal of a GDBusServer is emitted by default through an idle source and the actual message processing starts only after a signal handler returns TRUE. Thus, before the signal handler has the chance to run, the GDBus worker thread may detect that the connection is closed and schedule the delivery of the 'closed' signal through another idle source. After the termination of the 'new-connection' handler, the 'closed' handler is executed, which cancels the subscription to GDBus signals before any message has been processed. This looks like a bug in GDBusServer; to work around it, just delay the close of connection to let the signal dispatch run first. https://bugzilla.gnome.org/show_bug.cgi?id=755170
* code: merge branch 'th/enslave-team-rh1183444'Thomas Haller2015-10-022-30/+54
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1183444
| * device: fix activating slave device when stage1 delays actionThomas Haller2015-10-021-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When activating for example a team device which is to be enslaved to a bridge, nm_device_activate_stage1_device_prepare() will postpone stage 2. In that case, we didn't register the "master-ready" of the team device and thus never progressed the slave from stage2. Reproduce: # nmcli connection delete t-br0 # nmcli connection delete t-team0 nmcli connection add type bridge con-name t-br0 autoconnect no ifname i-br0 ip4 192.168.177.100/24 gw4 192.168.177.1 nmcli connection add type team con-name t-team0 autoconnect no ifname i-team0 nmcli connection modify id t-team0 connection.master i-br0 connection.slave-type bridge nmcli connection up t-team0
| * device: use nm_clear_g_signal_handler() to clear master-ready signal handlerThomas Haller2015-10-021-8/+2
| |
| * macros: add nm_clear_g_signal_handler() helperThomas Haller2015-10-021-0/+13
|/
* config: initialize gs_free marked variableJiří Klimeš2015-10-021-1/+1
| | | | | | | | | | | | | | Otherwise I get the following error (iwhile building in Jenkins): In file included from ../include/nm-default.h:45:0, from nm-config.c:27: nm-config.c: In function 'nm_config_set_global_dns': ../include/gsystem-local-alloc.h:31:10: error: 'group_name' may be used uninitialized in this function [-Werror=maybe-uninitialized] func (*(Type*)v); \ ^ nm-config.c:1483:17: note: 'group_name' was declared here gs_free char *group_name; ^
* wifi: emit NEW_BSS on ScanDone to update APs in Wi-Fi device (rh #1267327)Jiří Klimeš2015-10-021-15/+46
| | | | | | | | | | | | | | | | | | | When a Wi-Fi is switched to AP mode, NMDeviceWifi forgets the AP scan list. Later, when the device goes back to normal managed mode, the device was not able to acquire the AP list again (for a long time), because the list is only populated when a new BSS is signalled. And that could take very long or never happen as the supplicant would have to lost the BSS and announce it later. Fix the problem by announcing known BSSs as a response to ScanDone signal. Testcase: $ nmcli con add type wifi ifname wlan0 con-name my-wifi-ap autoconnect off ssid MYSSID $ nmcli con modify my-wifi-ap wifi.mode ap ipv4.method shared $ nmcli con up my-wifi-ap $ nmcli con down my-wifi-ap $ nmcli device wifi list https://bugzilla.redhat.com/show_bug.cgi?id=1267327
* supplicant: fix BSSs property typeJiří Klimeš2015-10-021-1/+1
| | | | BSSs property is an array of object paths, not strings.
* nm-vpn-service-plugin: increase the quit timerLubomir Rintel2015-10-013-3/+3
| | | | | | | | | | | | | | We now (since 3272ff6 libnm/libnm-glib: don't quit in the middle of asking for secrets) always hook on the quit timer when NM asks the plugin if it needs secrets. The timer is 20 seconds, which seems too short. Let's make it three minutes. Don't bother adding another timer or using a distinct timeout: it does no harm for the plugin to remain unused for three minutes on a bus. Another option would be to completely unhook it; however the plugin wouldn't learn if the user cancelled the NM's secrets request and would remain unused on the bus forever.
* nm-config: drop a glib 2.40-ismLubomir Rintel2015-10-011-1/+1
| | | | Fixes: ae9e82354a9c1b2247b7d071ed62acd9e83ae27b
* core: merge branch 'bg/global-dns-conf-bgo750458'Beniamino Galvani2015-10-0122-68/+1131
|\ | | | | | | | | | | | | Add support for a global DNS configuration read from user configuration file or set through D-Bus. https://bugzilla.gnome.org/show_bug.cgi?id=750458
| * manager: export DNS global configuration D-Bus propertyBeniamino Galvani2015-10-019-16/+364
| |
| * man: document global DNS configuration sectionsBeniamino Galvani2015-10-011-0/+66
| |
| * dns: add support for global configuration in DNS managerBeniamino Galvani2015-10-017-52/+169
| | | | | | | | | | | | | | Modify the DNS manager to use the static global DNS configuration when available. In addition, change DNS plugins interface to accept a new argument for global configuration and add support for this new parameter to the dnsmasq plugin.
| * core: add support for reading global DNS configuration from keyfileBeniamino Galvani2015-10-019-0/+457
| | | | | | | | | | | | Add to the NMConfigData object information about global DNS configuration, which is loaded from user or internal keyfile upon object construction.
| * glib-compat: add g_hash_table_get_keys_as_array() compat functionBeniamino Galvani2015-10-012-0/+75
|/
* contrib/rpm: remove dbus-glib dependancyThomas Haller2015-09-301-1/+0
| | | | Only libnm-glib still requires dbus-glib.
* build: extract version macros from "nm-version.h" to new header file ↵Thomas Haller2015-09-3052-111/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "nm-version-macros.h" For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus paths of NetworkManager. It is desirable to have this header usable without having a dependency on "glib.h", for example for a QT application. For that, commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy. For libnm-glib library, the analog to "nm-dbus-interface.h" is "NetworkManager.h", and the same applies there. Commit 159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include. However, that broke build on PackageKit [1] which expected to get the version macros by including "NetworkManager.h". So at least for libnm-glib, we need to preserve old behavior so that a user including "NetworkManager.h" gets the version macros, but not "glib.h". Extract the version macros to a new header file "nm-version-macros.h". This header doesn't include "glib.h" and can be included from "NetworkManager.h". This gives as previous behavior and a glib-free include. For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h". Very few users will actually need the version macros, but not using libnm. Users that use libnm, should just include (libnm's) "NetworkManager.h" to get all headers. As a special case, a user who doesn't want to use glib/libnm, but still needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include them both separately. [1] https://github.com/hughsie/PackageKit/issues/85 Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b
* tui: fix crash during activation when failed to create secret-agentThomas Haller2015-09-301-4/+4
| | | | | | | | | | NetworkManager only allows one 'client:user-id' to register as secret agent. Thus, when starting nmtui in two terminals, creating the secret agent can fail. This can lead to a crash. https://bugzilla.gnome.org/show_bug.cgi?id=755883
* dnsmasq-manager: forget the watch when the callback hitsLubomir Rintel2015-09-301-0/+1
| | | | It removes the source, we shouldn't try to remove it on dispose() then.
* bus-manager: only unregister skeletons if they were actually registeredLubomir Rintel2015-09-301-1/+2
|
* firewall-manager: handle bus connection failureLubomir Rintel2015-09-301-5/+10
|
* all: use glib compatibility functions for g_hash_table_add() and ↵Thomas Haller2015-09-303-25/+5
| | | | g_hash_table_insert()
* glib-compat: add compatibility function for g_hash_table_insert() and ↵Thomas Haller2015-09-301-0/+29
| | | | | | | g_hash_table_add() They have a different name, because we don't want to do the extra work unless explicitly requested.
* build: add .travis.ymlLubomir Rintel2015-09-301-0/+10
|
* all: g_hash_table_add doesn't return a value before 2.40Lubomir Rintel2015-09-303-0/+20
|
* manager: fix a reversed conditionalLubomir Rintel2015-09-301-1/+1
| | | | | | | find_ac_for_connection() needs the uuid when the connection is not a NMSettingConnection. Fixes: 06da3532428e3498c1e808ff8be1af48b540a6ff
* vpn-connection: set the MTU for the VPN IP interfaceLubomir Rintel2015-09-291-7/+3
| | | | | | | | | | | The 9b79e6c73 commit moved setting of the MTU from IP4Config to NMDevice, but VPN connections don't have a NMDevice instance (yet). Set the MTU also from the VPN connection. Also, copying of the MTU to the IP4Config is no longer needed as the ip4_config_commit no longer sets the MTU. Fixes: 9b79e6c732ffb2fb105647c1465070d36a6cc180 https://bugzilla.gnome.org/show_bug.cgi?id=754781
* firewall-manager: avoid leaving dangling request if firewalld is not runningLubomir Rintel2015-09-291-1/+1
| | | | | | | | | | | Unhook it prior to deallocation. Fixes an assertion on daemon shutdown: NetworkManager[30037]: <info> exiting (success) ** NetworkManager:ERROR:nm-firewall-manager.c:489:dispose: assertion failed: (g_hash_table_size (priv->pending_calls) == 0) Aborted (core dumped) Fixes: 94f888a2628a5e743d5abbb3e6f95c7c83052f09
* build: set -Werror when checking whether a -W<warning> option worksLubomir Rintel2015-09-291-1/+1
| | | | | | | | Otherwise the check is effectively a no-op and unknown options still get turned on. This results in unknown warnings when build without --with-extra-warnings=error: warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
* merge: S390 subchannels improvements (bgo #755610)Jiří Klimeš2015-09-2912-44/+357
|\ | | | | | | | | | | | | | | - export device's S390 subchannels on D-Bus - update 390 subchannels comparison for connection vs.device compatibility - support s390 subchannels in libnm and nmcli https://bugzilla.gnome.org/show_bug.cgi?id=755610
| * tests: add a test for connection_compatible() for wired devicesJiří Klimeš2015-09-295-17/+171
| | | | | | | | | | Allow setting MAC address and S390 subchannels for ethernet devices in testing NM service.
| * cli: print s390 subchannels for devices that have thatJiří Klimeš2015-09-291-4/+6
| |
| * libnm: match s390 subchannels and MAC blacklist in connection_compatible()Jiří Klimeš2015-09-291-10/+86
| | | | | | | | | | Basically, make it the same as check_connection_compatible() in src/devices/nm-device-ethernet.c
| * libnm: add 390-subchannels property to NMDeviceEthernetJiří Klimeš2015-09-293-0/+45
| |
| * device: export S390Subchannels property on Ethernet deviceJiří Klimeš2015-09-293-13/+49
|/ | | | and update match_subchans() to compare number of subchannels too.
* contrib/rpm: regenerate automake with locally present versionLubomir Rintel2015-09-281-2/+1
| | | | | | | The modification of po/Makefile.in.in may trigger re-run of autotools and it would fail if the versions differ. Fixes: 2318c0de9291b9dcf9e720a2e5041266449dfd57
* Revert "libnm-util: don't include "nm-version.h" in "NetworkManager.h""Thomas Haller2015-09-261-0/+2
| | | | | | | | This breaks build of PackageKit. Revert the patch. This reverts commit 159e827a72f420048e12d318f8ba1edd3f641fc8. https://bugzilla.gnome.org/show_bug.cgi?id=755660
* device: ensure firewall zone is set on the actual IP interfaceBeniamino Galvani2015-09-261-3/+30
| | | | | | | | | | | | | For certain types of connection as PPP and WWAN the IP interface is created during stage3 (IP config) but we are setting the firewall zone at the beginning of stage3 and thus the zone is only set on the underlying interface. Add a check at the start of IP check phase to ensure that the firewall zone is set again if the device interface is different from IP interface. https://bugzilla.redhat.com/show_bug.cgi?id=1110465
* device: increase IPv6LL DAD timeout (rh #1101809)Dan Williams2015-09-251-1/+6
| | | | | | | | | | | | Depending on the network and the values of the 'dad_transmits' and 'retrans_timeout_ms' sysctls, DAD for the IPv6LL address can take quite a while. Obviously there must be some upper bound on the timeout, but 5 seconds seems a bit low. In this case it was observed to be ~12 seconds but the sysctl values are unknown. In any case, we can't predict the network/config so being a bit more lenient here makes sense. https://bugzilla.redhat.com/show_bug.cgi?id=1101809
* libnm: add NM_AVAILABLE_IN_1_2 to "nm-dbus-interface.h"Thomas Haller2015-09-251-0/+9
| | | | | "nm-dbus-interface.h" can be used without glib/libnm, hence we must workaround a missing NM_AVAILABLE_IN_1_2 macro.