summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libnm: don't invert order in array propertiesBeniamino Galvani2017-11-091-1/+1
| | | | | The order of elements in array properties was inverted when reconstructing the array. Keep the original order from D-Bus.
* core: merge branch 'th/dns-ip-config-unify'Thomas Haller2017-11-096-214/+199
|\
| * core: merge IPv4 and IPv6 implementations in NMDnsManagerth/dns-ip-config-unifyThomas Haller2017-11-092-208/+95
| |
| * core: add NMIPConfig helpersThomas Haller2017-11-092-6/+86
| | | | | | | | | | | | For now, hack some generic accessors to the NMIP4Config/NMIP6Config type. Eventually, NMIP4Config and NMIP6Config should get merged in one class.
| * libnm: add internal helper function nm_utils_inet_ntop()Thomas Haller2017-11-092-0/+18
|/
* build: fix make distcheckBeniamino Galvani2017-11-081-3/+7
| | | | | | | | | | | | | | | | | | | | | | Fixes the following errors in 'make distcheck': 1) GEN libnm/fake-typelib/NMClient.typelib failed to open 'libnm/fake-typelib/NMClient.typelib.tmp': No such file or directory make[2]: *** [libnm/fake-typelib/NMClient.typelib] Error 1 2) GEN libnm/fake-typelib/typelibs.c ../../libnm/fake-typelib/typelibs.gresource.xml: Failed to locate “NetworkManager.typelib” in any source directory. make[1]: *** [Makefile:17790: libnm/fake-typelib/typelibs.c] Error 1 3) ERROR: files left in build directory after distclean: ./libnm/fake-typelib/typelibs.c ./libnm/fake-typelib/NMClient.typelib ./libnm/fake-typelib/NetworkManager.typelib Fixes: 4d1f090aedf05c0e2955d431638e311d1e18a52f
* core: replace nm_dns_ip_config_data_get_dns_priority()Thomas Haller2017-11-085-22/+21
| | | | | Add instead nm_ip_config_get_dns_priority(). If we want to treat NMIP4Config/NMIP6Config generically, then the accessor should be right there.
* core: add generic opaque NMIPConfig typeThomas Haller2017-11-082-0/+34
| | | | | One day, I hope to merge NMIP4Config and NMIP6Config implementations. A small step, and a typesafe cast-macro.
* policy: merge IPv4 and IPv6 implementation of update_ip_dns()Thomas Haller2017-11-083-101/+52
|
* core: merge branch 'th/autoconnect-rh1401515-3'Thomas Haller2017-11-088-171/+162
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1401515
| * policy: don't block autoconnect for connections when disconnecting software ↵th/autoconnect-rh1401515Thomas Haller2017-11-081-39/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devices This was added by commit 979b8920b465867ea248dee23a8a290da28f75e5 (core: move virtual device autoconnect tracking bits out of NMManager) to avoid autoconnecting software devices repeatedly. That was done, because disconnecting a software device would delete the NMDevice instance, and there is no property on a device to prevent autoconnect. In the meantime, we only unrealize software devices and don't delete them entirely. Also, the autoconnect-blocked flags of the device are preserved when the device unrealized. It was anyway odd, that deactivating one software-device would block autoconnection for all matching connections.
| * device: improve tracking autoconnect-blocked flags of NMDeviceThomas Haller2017-11-085-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - split NM_DEVICE_AUTOCONNECT_BLOCKED_INTERN in two parts: "wrong-pin" and "manual-disconnect". Setting/unsetting them should be tracked differently, as their reason differs. - no longer initialize/clear the autoconnect-blocked reasons during realize/unrealize of the device. Instead, initialize it once when the object gets created (nm_device_init()), and keep the settings beyond unrealize/realize cycles. This only matters for software devices, as regular devices get deleted after unrealizing once. But for software devices it is essential, because we don't want to forget the autoconnect settings of the device instance. - drop verbose logging about blocking autoconnect due to failed pin. We already log changes to autoconnect-blocked flags with TRACE level. An additional message about this particular issue seems not necessary at INFO level. - in NMManager's do_sleep_wake(), no longer block autoconnect for devices during sleep. We already unmanage the device, which is a far more effective measure to prevent activation. We should not also block autoconnect.
| * device: refactor autoconnect blocking by introducing ↵Thomas Haller2017-11-086-53/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMDeviceAutoconnectBlockedFlags enum The flags allow for more then two reasons. Currently the only reasons for allowing or disallowing autoconnect are "user" and "intern". It's a bit odd, that NMDeviceAutoconnectBlockedFlags has a negative meaning. So nm_device_set_autoconnect_intern (device, FALSE); gets replaced by nm_device_set_autoconnect_blocked_set (device, NM_DEVICE_AUTOCONNECT_BLOCKED_INTERN); and so on. However, it's chosen this way, because autoconnect shall be allowed, unless any blocked-reason is set. That is, to check whether autoconnect is allowed, we do if (!nm_device_get_autoconnect_blocked (device, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL)) The alternative check would be if (nm_device_get_autoconnect_allowed (device, NM_DEVICE_AUTOCONNECT_ALLOWED_ALL) == NM_DEVICE_AUTOCONNECT_ALLOWED_ALL) which seems odd too. So, add the inverse flags to block autoconnect. Beside refactoring and inverting the meaning of the autoconnect settings, there is no change in behavior.
| * policy: don't check autoconnect flag of connection in ↵Thomas Haller2017-11-081-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nm_device_can_auto_connect() nm_device_can_auto_connect() only has one caller, auto_activate_device() in NMPolicy. That caller already checks whether the connection has autoconnect enabled, so drop the duplicate check. This saves some duplication, but it also makes some sense: NMSettingsConnection has a complex blocking of autoconnect, so just looking at connection.autoconnect is not enough in any case to determine whether the connection should autoconnect. We move thus more handling of autoconnect to NMPolicy, where it belongs.
| * policy: refactor auto_activate_device() to return earlyThomas Haller2017-11-081-37/+37
| |
| * policy: optimize nm_device_can_auto_connect() to not check ↵Thomas Haller2017-11-082-2/+11
| | | | | | | | nm_device_autoconnect_allowed()
| * device: minor refactoring of condition in nm_device_autoconnect_allowed()Thomas Haller2017-11-081-3/+6
| | | | | | | | Makes it clearer what is happening (to me).
| * device/olpc-mesh: reject autoconnect requests early via ↵Thomas Haller2017-11-081-5/+2
| | | | | | | | | | | | | | | | get_autoconnect_allowed() OLPC devices cannot autoconnect, according to can_auto_connect(). We should instead reject any attempt to autoconnect earlier, via get_autoconnect_allowed().
| * device: inline NMDevice's implementation of can_auto_connect()Thomas Haller2017-11-082-13/+18
| | | | | | | | | | Derived classes should not modify or overwrite this essential behavior of can_auto_connect(). It doesn't belong to the virtual function.
| * policy: remove redundant check in device_autoconnect_changed()Thomas Haller2017-11-081-4/+2
| | | | | | | | | | schedule_activate_check() also checks for nm_device_autoconnect_allowed() and aborts if there is nothing to do.
| * device: move nm_device_get_enabled() from schedule_activate_check() to ↵Thomas Haller2017-11-082-3/+3
| | | | | | | | nm_device_autoconnect_allowed()
| * device: drop stub implementation of get_autoconnect_allowed() in NMDeviceThomas Haller2017-11-082-12/+5
|/
* po: update Swedish (sv) translation (bgo #790018)Josef Andersson2017-11-071-2301/+4950
| | | | | | Reviewed-by: Anders Jonsson <anders.jonsson@norsjovallen.se> https://bugzilla.gnome.org/show_bug.cgi?id=790018
* examples: add python example using VPN import codeThomas Haller2017-11-061-0/+74
| | | | Show how to load and use the VPN plugins from python.
* ifcfg-rh: persist the connection type for TeamPort connectionsBeniamino Galvani2017-11-065-3/+78
| | | | | | | | | | Currently the ifcfg-rh plugin doesn't explicitly store the connection type for team slaves and is only able to read back ethernet and vlan connections. Leave this unchanged for ethernet and vlan slaves, but store the TYPE variable for other connection types (Wi-Fi and Infiniband) so that we can properly determine their type when the connection is read.
* build: fix glib-compile-resources for unsupported --internal flagThomas Haller2017-11-061-1/+1
| | | | | | | | | | | | | | Travis' version of glib-compile-resources does not support the --internal flag: GEN libnm/fake-typelib/typelibs.c Unknown option --internal make: *** [libnm/fake-typelib/typelibs.c] Error 1 We don't really need it anyway, because we have a linker version script, that controls symbol visibility. Fixes: 4d1f090aedf05c0e2955d431638e311d1e18a52f
* po: update Polish (pl) translation (bgo #789874)Piotr Drąg2017-11-061-1280/+1416
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=789874
* doc: fix type on documentation for NMSettingOvsPort:bond-updelayThomas Haller2017-11-062-2/+2
| | | | | | Fixes: 8a1ae40a80efcd6632ea7ba4845b85aec5afe19b https://bugzilla.gnome.org/show_bug.cgi?id=789880
* build: make dist with fake typelibsLubomir Rintel2017-11-061-1/+6
| | | | Fixes: 4d1f090aedf05c0e2955d431638e311d1e18a52f
* logging: configure dnsmasq's logging in shared mode via nm-loggingThomas Haller2017-11-062-2/+3
|
* man: document PROXY logging domainThomas Haller2017-11-061-1/+3
|
* libnm: register empty NMClient and NetworkManager when loading libnm with GIRLubomir Rintel2017-11-067-4/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register empty "NMClient" and "NetworkManager" GIR modules as soon as libnm is loaded witch gnome-introspection. This prevents the real modules from being loaded because they would in turn load libnm-glib and abort() and crash. In particular this prevents the GNOME shell from crashing with libnm-glib abort and allows gracefully disabling the extensions which use the obsolete library. Test: $ cat test.js const NM = imports.gi.NM; print (NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION); const NMClient = imports.gi.NMClient; print (NMClient.SecretAgentGetSecretsFlags.ALLOW_INTERACTION); Before: $ gjs test.js 1 (gjs:16253): libnm-util-ERROR **: libnm symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported Trace/breakpoint trap (core dumped) $ After: $ gjs test.js 1 Gjs-Message: JS WARNING: [test.js 5]: reference to undefined property "SecretAgentGetSecretsFlags" (gjs:16228): Gjs-WARNING **: JS ERROR: TypeError: NMClient.SecretAgentGetSecretsFlags is undefined @test.js:5:1 JS_EvaluateScript() failed
* examples/js: add a javascript exampleLubomir Rintel2017-11-062-0/+186
| | | | Converted from python/gi/get_ip.py.
* shared: update version macros for 1.11Beniamino Galvani2017-11-031-2/+3
| | | | Fixes: c2c44d16f40bd3cd769d8073d13a3e2009cf59b2
* release: bump version to 1.11.0 (development)1.11.0-devBeniamino Galvani2017-11-032-2/+16
|
* release: bump version to 1.9.90 (1.10-rc1)1.10-rc1Beniamino Galvani2017-11-031-1/+1
|
* NEWS: update for a release candidateBeniamino Galvani2017-11-031-0/+51
|
* ndisc: fix ordering of gatewaysBeniamino Galvani2017-11-032-5/+66
| | | | | | | | | Insert the new gateway at the end when it has the least preference. Fixes the following runtime error: src/ndisc/nm-ndisc.c:204:_ASSERT_data_gateways: assertion failed: (_preference_to_priority (item_prev->preference) >= _preference_to_priority (item->preference))
* clients: merge branch 'bg/cli-agent-race-rh1438476'Beniamino Galvani2017-11-022-5/+16
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1438476
| * cli: enable secret-agent only after activationBeniamino Galvani2017-11-021-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the activation procedure for connections that require secrets in the following way: - nmcli creates a secret-agent and leaves it disabled so that incoming requests are queued - nmcli calls ActivateConnection() - when the method returns success, the secret-agent gets enabled and all queued requests are processed When the user activates a connection which is already auto-activating, NM will deactivate the current active-connection and will call CancelGetSecrets() for it before the new ActivateConnection() returns. In this way, when the secret-agent is enabled by nmcli, we have the guarantee that there aren't any queued requests for the deactivating connections. https://bugzilla.redhat.com/show_bug.cgi?id=1438476
| * clients: implement CancelGetSecrets() secret-agent APIBeniamino Galvani2017-11-021-1/+6
|/
* systemd: let "NetworkManager-wait-online.service" require ↵Thomas Haller2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | "NetworkManager.service" `systemctl start network-online.target` should suffice to start "NetworkManager.service". That would work because - "network-online.target" has "Wants=NetworkManager-wait-online.service" - "NetworkManager-wait-online.service" has "Require=NetworkManager.service". But previously, "NetworkManager-wait-online.service" would just fail with missing dependency. See also https://github.com/systemd/systemd/pull/6065 which does the same for networkd's wait-online serice, and see rh#1452866 for a use-case. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1452866
* contrib/rpm: fix builds without ovs supportBeniamino Galvani2017-11-021-0/+5
| | | | | | | | | | | | Don't compile ovs support when the RPM is built --without=ovs, to fix the following error: error: Installed (but unpackaged) file(s) found: /usr/lib/systemd/system/NetworkManager.service.d/NetworkManager-ovs.conf /usr/lib64/NetworkManager/libnm-device-plugin-ovs.so /usr/share/man/man7/nm-openvswitch.7.gz Fixes: 830a5a14cb29ca00b73a9623c1ea7c5cd92f4d00
* all: merge branch 'th/autoconnect-rh1401515-2'Thomas Haller2017-11-0216-169/+127
|\ | | | | | | Related: https://bugzilla.redhat.com/show_bug.cgi?id=1401515
| * wifi: use connection.auth-retries to handle authentication in NMDeviceWifiThomas Haller2017-11-021-27/+4
| |
| * device: move tracking auth_retry to NMDeviceThomas Haller2017-11-024-42/+24
| | | | | | | | | | It will be also used by NMDeviceWifi. It might waste a 4 bytes for device types that don't require authentication. But it deduplicates code.
| * ifcfg-rh: use svSetValueInt64_cond() in write_connection_setting()Thomas Haller2017-11-021-13/+11
| |
| * all: move setting 802-1x.auth-retries to connection.auth-retriesThomas Haller2017-11-0215-105/+106
|/ | | | | | | | | | | The number of authentication retires is useful also for passwords aside 802-1x settings. For example, src/devices/wifi/nm-device-wifi.c also has a retry counter and uses a hard-coded value of 3. Move the setting, so that it can be used in general. Although it is still not implemented for other settings. This is an API and ABI break.
* libnm/client: proxy *_enabled and metered properties to the right objectLubomir Rintel2017-11-021-4/+4
| | | | They're provided by the Manager, not by the RemoteSettings.
* ifcfg-rh: refactor write_object() to avoid coverity warningThomas Haller2017-10-311-18/+13
| | | | | | Coverity detects that the "if (blob)" condition must always be true. Reorder the code, to avoid the warning. It's a bit clearer this way anyway.