summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* platform: add support for routing-ruleth/routing-ruleThomas Haller2019-03-046-18/+836
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1652653
* platform: separate the refresh-type from the object typeThomas Haller2019-03-041-102/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is a directy one to one relation between - DELAYED_ACTION_TYPE_REFRESH_ALL_* - REFRESH_ALL_TYPE_* - NMP_OBJECT_TYPE_* For IP addresses, routes and routing policy rules, when we request a refresh-all (NLM_F_DUMP), we want to specify the address family. For addresses and routes that is currently solved by having two sets of NMPObject types, for each address family one. I think that is cumbersome because the implementations of both address families are quite similar. By implementing both families as different object types, we have a lot of duplicate code and it's hard to see where the families actually differ. It would be better to have only one NMPObject type, but then when we "refresh-all" such types, we still want to be able to dump all (AF_UNSPEC) or only a particular address family (AF_INET, AF_INET6). Decouple REFRESH_ALL_TYPE_* from NMP_OBJECT_TYPE_* to make that possible.
* platform/trivial: rename enum DELAYED_ACTION_IDX_REFRESH_ALL_* to ↵Thomas Haller2019-03-041-25/+25
| | | | | | | | | | | | REFRESH_ALL_TYPE_* While these numbers are strongly related to DELAYED_ACTION_TYPE_REFRESH_ALL_*, they differ in their meaning. These are the refresh-all-types that we support. While some of the delayed-actions are indeed for refresh-all, they are not the same thing. Rename the enum.
* platform: drop unused nm_platform_refresh_all()Thomas Haller2019-03-043-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The function is unused. It would require redesign to work with future changes, and since it's unused, just drop it. The long reasoning is: Currently, a refresh-all is tied to an NMPObjectType. However, with NMPObjectRoutingRule (for policy-routing-rules) that will no longer be the case. That is because NMPObjectRoutingRule will be one object type for AF_INET and AF_INET6. Contrary to IPv4 addresses and routes, where there are two sets of NMPObject types. The reason is, that it's preferable to treat IPv4 and IPv6 objects similarly, that is: as the same type with an address family property. That also follows netlink, which uses RTM_GET* messages for both address families, and the address family is expressed inside the message. But then an API like nm_platform_refresh_all() makes little sense, it would require at least an addr_family argument. But since the API is unused, just drop it.
* platform: suppress unnecessary logging in do_request_all_no_delayed_actions()Thomas Haller2019-03-041-3/+8
| | | | | When we refresh all links, we clear all flags to refresh a specific link. However, only log a message if there was anything to clear.
* platform: add NULL check in inline nmp_object_unref() functionThomas Haller2019-03-041-2/+4
| | | | | | This allows the compiler to see that this function does nothing for %NULL. That is not so unusual, as we use nm_auto_nmpobj to free objects. Often the compiler can see that these pointers are %NULL.
* platform: add NMPlatformObjWithIfindex helper structure for handling ↵Thomas Haller2019-03-048-47/+115
| | | | | | | | | | | | | | | | | | | | | NMPObject types Until now, all implemented NMPObject types have an ifindex field (from links, addresses, routes, qdisc to tfilter). The NMPObject structure contains a union of all available types, that makes it easier to down-case from an NMPObject pointer to the actual content. The "object" field of NMPObject of type NMPlatformObject is the lowest common denominator. We will add NMPlatformRoutingRules (for policy routing rules). That type won't have an ifindex field. Hence, drop the "ifindex" field from NMPlatformObject type. But also add a new type NMPlatformObjWithIfindex, that can represent all types that have an ifindex.
* platform: move nmp_class_from_type() to header to allow inliningThomas Haller2019-03-042-12/+13
|
* platform: drop unnecessary casts from NMP_OBJECT_CAST_*() macrosThomas Haller2019-03-041-7/+7
| | | | | It's wrong to cast here. The caller must always provide an NMPObject pointer.
* platform: unify IPv4 and IPv6 variables for NMPlatformVTableRouteThomas Haller2019-03-042-23/+30
|
* ifcfg-rh: avoid duplicate cache lookup in is_wifi_device()Thomas Haller2019-03-041-6/+4
|
* po: update Esperanto (eo) translationKristjan SCHMIDT2019-02-261-1837/+2034
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/86
* wifi: merge branch 'bg/pmf-fix-issue129'Beniamino Galvani2019-02-261-17/+20
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129
| * supplicant: fix setting pmf when the supplicant doesn't advertise supportBeniamino Galvani2019-02-261-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | wpa_supplicant only advertises pmf support since commit [1], which is after 2.6. When using a version without that commit (for example, plain 2.6), we would unconditionally set the global Pmf property to 1 (optional) and then skip setting the per-network property. The result was that pmf was enabled without the possibility to disable it by user. The correct behavior is instead to disable pmf on such versions. [1] https://w1.fi/cgit/hostap/commit/?id=3cdb4ac074f76accf24a51d143db545afad2c90b https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129
| * supplicant: clarify ready_count usageBeniamino Galvani2019-02-261-13/+15
|/
* examples: fix handling secrets in nm-wg-setThomas Haller2019-02-261-2/+17
| | | | | | | | | | | | When setting any secrets via D-Bus' Update2 call, then it assumes that all settings are reset. That means, when we modify any secrets in the client, we need to first load them all. Anyway, load always all secrets, then we can also print them in the get output. Honor WG_HIDE_KEYS like `wg` does.
* examples: improve hints about existing WireGuard profiles in nm-wg-setThomas Haller2019-02-261-6/+21
|
* libnm,core: fix device TYPE for Wi-Fi P2P devicesThomas Haller2019-02-263-17/+34
| | | | | | | | | | | Don't use "wifip2p" for the type description. $ nmcli device DEVICE TYPE STATE CONNECTION wlan0 wifi connected x p2p-dev-wlan0 wifip2p disconnected -- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/87
* cli/tests: fix cli tests after changing Polish translationsThomas Haller2019-02-252-117/+117
| | | | | | | | The tests run nmcli with Polish locale and compare the output. After modifying Polish translation we must regenerate the expected output. Fixes: 01b7b32afb3805dacd2cc38846789e0211131dec
* po: update Polish (pl) translationPiotr Drąg2019-02-251-4242/+1855
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/91
* Mark broken strings in translations as fuzzyPiotr Drąg2019-02-256-16/+16
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/89
* release: update NEWSThomas Haller2019-02-231-3/+10
|
* release: bump version to 1.17.0 (development)1.17.0-devThomas Haller2019-02-234-3/+18
|
* release: bump version to 1.15.90 (1.16-rc1)1.16-rc1Thomas Haller2019-02-232-2/+2
|
* release: update NEWSThomas Haller2019-02-231-0/+20
|
* release: update NEWS with entires from 1.14.6Thomas Haller2019-02-231-5/+40
|
* Revert "build/meson: name platform tests like autotools"Thomas Haller2019-02-231-2/+2
| | | | | | | | | | | | | | | Older versions of meson don't support building the same names multiple times. Meson encountered an error in file src/tests/meson.build, line 14, column 2: Tried to create target "test-general", but a target of that name already exists. We really need to use unique filenames everywhere. Revert the name change for now. This breaks again the valgrind workaround in "tools/run-nm-test.sh". This reverts commit 5466edc63e38352e06a8328f512b8c3620757321.
* build/meson: name platform tests like autotoolsThomas Haller2019-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Meson and autotools should name the tests the same way. Also, all tests binaries built by autotools start on purpose with "test-". Do that for meson too. Also, otherwise "tools/run-nm-test.sh" fails to workaround valgrind failures for platform tests as it does not expect the tests to be named that way: if [ $HAS_ERRORS -eq 0 ]; then # valgrind doesn't support setns syscall and spams the logfile. # hack around it... if [ "$TEST_NAME" = 'test-link-linux' -o \ "$TEST_NAME" = 'test-acd' ]; then if [ -z "$(sed -e '/^--[0-9]\+-- WARNING: unhandled .* syscall: /,/^--[0-9]\+-- it at http.*\.$/d' "$LOGFILE")" ]; then HAS_ERRORS=1 fi fi fi
* build/meson: increase timeouts for some testsThomas Haller2019-02-2311-10/+21
| | | | | | | | | | | | | | | | | | The defaults for test timeouts in meson is 30 seconds. That is not long enough when running $ NMTST_USE_VALGRIND=1 ninja -C build test Note that meson supports --timeout-multiplier, and automatically increases the timeout when running under valgrind. However, meson does not understand that we are running tests under valgrind via NMTST_USE_VALGRIND=1 environment variable. Timeouts are really not expected to be reached and are a mean of last resort. Hence, increasing the timeout to a large value is likely to have no effect or to fix test failures where the timeout was too rigid. It's unlikely that the test indeed hangs and the increase of timeout causes a unnecessary increase of waittime before aborting.
* license: re-license initrd-generator and ibft reader as LGPLThomas Haller2019-02-223-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New code we want to add LGPL licensed to make it easier to share code between libnm and the daemon. The code in question was only recently added in commit b544f7243d ("initrd: add iBFT reader") and mostly written from scratch by Lubomir. Some parts were adapted from earlier ibft code. $ git shortlog -s -e -- src/settings/plugins/ibft/ ':(exclude)*/meson.build' 3 Beniamino Galvani <bgalvani@redhat.com> 1 Colin Walters <walters@verbum.org> 2 Dan Williams <dcbw@redhat.com> 17 Dan Winship <danw@redhat.com> 7 Lubomir Rintel <lkundrak@v3.sk> 46 Thomas Haller <thaller@redhat.com> $ git log --no-merges -L '/^fill_ip4_setting_from_ibft/,/^}/:src/settings/plugins/ifcfg-rh/reader.c' fc9c1f1557b517e799d15802e8f3d0ea43b0daea~ | grep '^Author: ' | sort | uniq Author: Dan Williams <dcbw@redhat.com> Author: Dan Winship <danw@redhat.org> Author: Jiří Klimeš <jklimes@redhat.com> Author: Pavel Šimerda <psimerda@redhat.com> Hence, all non-trival contributions were provided by Red Hat employees and the copy-right is with Red Hat. Acked-by: Dan Williams <dcbw@redhat.com> Acked-by: Dan Winship <danw@redhat.com> Acked-by: Lubomir Rintel <lkundrak@v3.sk>
* all/trivial: fix whitespace/indentationThomas Haller2019-02-222-5/+5
|
* device: fix suppressing warning log about unsupported IPv6LL handlingThomas Haller2019-02-221-1/+1
| | | | | | | | Wrongly did not suppress the message <warn> [1550844832.3749] device (tunl0): failed to disable userspace IPv6LL address handling (not-supported) Fixes: d18f40320d1a5bb5f43a61f473d2cb6105da9b4e
* device: do ARP announcements only after masters have a slaveBeniamino Galvani2019-02-221-3/+35
| | | | | | | | | | | | | Delay ARP announcements for masters until the first interfaces gets enslaved. There is no point in doing it before as the ARP packets would be dropped in most cases; also, if the first slave is added when we already started announcing, the MAC of the master is going to change and so the remaining ARPs will have a wrong "sender mac address" field. https://bugzilla.redhat.com/show_bug.cgi?id=1678796 https://github.com/NetworkManager/NetworkManager/pull/301
* cli: merge branch 'th/nmcli-wifi-p2p-wfd-ies'Thomas Haller2019-02-229-238/+256
|\ | | | | | | https://github.com/NetworkManager/NetworkManager/pull/300
| * cli: support NM_SETTING_WIFI_P2P_WFD_IES propertyThomas Haller2019-02-221-0/+3
| |
| * cli: rework NM_SETTING_802_1X_PASSWORD_RAW property functions to operate on ↵Thomas Haller2019-02-222-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generic GBytes Rework the explicit implementation of NM_SETTING_802_1X_PASSWORD_RAW handling to generically handle GBytes properties. Note that the NM_SETTING_802_1X_PASSWORD_RAW setter accepts a legacy format where hex-words are separated by space. I don't think we want to support this format for new options. So, there are two possibilities: 1) either leave _set_fcn_802_1x_password_raw() as-is, with the special handling. 2) interpret a property-data gobject_bytes.legacy_format. 1) seems to make more sense, because there is only one such property, and we won't use this for new properties. However let's do 2), because it shows nicely the two styles side-by-side. In other words, let's password-raw also be a _pt_gobject_bytes typed property, with some special legacy handling. Instead, of having it an entirely separate property type (with a different setter implementation). I think it's better to have the parts where they differ pushed down (the "stack") as much as possible.
| * cli: use nm_utils_bin2hexstr_full() in nmcli to convert bytes to stringThomas Haller2019-02-221-8/+6
| | | | | | | | | | | | | | | | | | | | | | - it's less lines of code (for the caller). - it's a function that can be easier unit-tested on its own. Possibly there are already other unit-tests that cover it. - it's more efficient than the GString based implementation. - it reuses our one and only bin-to-hexstr implementation.
| * shared: support empty blobs in nm_utils_bin2hexstr_full()Thomas Haller2019-02-221-15/+17
| | | | | | | | | | | | | | The limitation to not accept a length of 0 is easy to forget. Handle also empty blobs in a sensible way, by returning the empty word.
| * all: move nm_utils_hexstr2bin*() to sharedThomas Haller2019-02-227-197/+197
| | | | | | | | | | | | | | | | | | | | | | libnm exposes simplified variants of hexstr2bin in its public API. I think that was a mistake, because libnm should provide NetworkManager specific utils. It should not provide such string functions. However, nmcli used to need this, so it was added to libnm. The better approach is to add it to our internally shared static library, so that all interested components can make use of it.
| * cli: use correct define for NM_SETTING_WIFI_P2P_WPS_METHOD nameThomas Haller2019-02-221-1/+1
|/ | | | | There is no change in behavior, because NM_SETTING_WIFI_P2P_WPS_METHOD and NM_SETTING_WIRELESS_SECURITY_WPS_METHOD both are "wps-method".
* wireguard: merge branch 'th/wireguard-pt3'Thomas Haller2019-02-2230-31/+5274
|\ | | | | | | https://github.com/NetworkManager/NetworkManager/pull/295
| * release: update NEWSth/wireguard-pt3Thomas Haller2019-02-221-0/+3
| |
| * core/wireguard: add support for WireGuard peersThomas Haller2019-02-221-41/+1016
| | | | | | | | | | | | | | | | | | | | | | That is slightly complex, because we need to (DNS) resolve the endpoints, and we also have to retry periodically. For example, initially we may be unable to resolve an endpoint, but later we may be. What is also interesting is that during assume and reapply, we may not have all information in the profile. Most notably, the private keys will be missing. We need to cope with that and not reconfigure keys. However, we still need to resolve names and update the endpoints.
| * core/wireguard: add basic support for creating wireguard devicesThomas Haller2019-02-222-21/+327
| | | | | | | | | | Configuring peers (and allowed-ips of the peers) is not yet supported.
| * examples: add python example script "nm-wg-set" for modifying WireGuard profileThomas Haller2019-02-222-0/+424
| | | | | | | | | | | | | | | | Use the script to test how GObject introspection with libnm's WireGuard support works. Also, since support for WireGuard peers is not yet implemented in nmcli (or other clients), this script is rather useful.
| * libnm/tests: add tests for creating wireguard connection profilesThomas Haller2019-02-221-0/+425
| |
| * libnm: add NMWireGuardPeer and libnm support for peersThomas Haller2019-02-229-16/+2426
| |
| * libnm,cli: add NMSettingWireGuardThomas Haller2019-02-2221-10/+710
|/ | | | | | | | | | | | | | For now only add the core settings, no peers' data. To support peers and the allowed-ips of the peers is more complicated and will be done later. It's more complicated because these are nested lists (allowed-ips) inside a list (peers). That is quite unusual and to conveniently support that in D-Bus API, in keyfile format, in libnm, and nmcli, is a effort. Also, it's further complicated by the fact that each peer has a secret (the preshared-key). Thus we probably need secret flags for each peer, which is a novelty as well (until now we require a fixed set of secrets per profile that is well known).
* libnm/docs: fix enum definition that confuses gtk-docThomas Haller2019-02-222-2/+6
| | | | | | WARNING: Failed to parse "| NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE, /*< skip >*/" in /data/src/NetworkManager/build/../libnm-core/nm-setting-wired.h Fixes: c3f6356a39caf6bc7b159be81ebaa05b929b62f4
* platform: merge branch 'th/platform-netlink-cleanup'Thomas Haller2019-02-2211-513/+864
|\ | | | | | | https://github.com/NetworkManager/NetworkManager/pull/299