summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libnm,core: make for-each-secret implementation virtual functions of NMSettingth/settings-for-each-secretThomas Haller2019-01-315-53/+98
| | | | | | | | | | | We already need to special handle regular settings (with secrets as GObject properties) and VPN secrets. Next, we will also need to special handle WireGuard peers, which can have secrets too. Move the code to a virtual function, so that "nm-connection.c" and "nm-setting.c" does not have explicit per-setting knowledge.
* libnm,core: various cleanups of _nm_connection_for_each_secret()Thomas Haller2019-01-312-25/+33
| | | | | | | | - use cleanup attribute to free memory - return floating reference from _nm_connection_for_each_secret(). It's more idiomatic that a function that constructs a variant and returns it, to return a floating variant.
* libnm,core: move _nm_connection_for_each_secret() from core to libnm-coreThomas Haller2019-01-313-147/+164
| | | | | | | | | | | | | _nm_connection_for_each_secret() (formerly for_each_secret()) and _nm_connection_find_secret() (formerly find_secret()) operate on a GVariant of secrets. For that, they implement concrete assumptions of how to handle secrets. For example, it must special-case VPN settings, because there is no generic abstraction to handle regular secret and VPN secrets the same. Such special casing should only be done in libnm-core, at one place. Move the code to libnm-core as internal API.
* settings: fix handling of VPN secrets in for_each_secret()Thomas Haller2019-01-311-5/+6
| | | | | | | | | | | | nm_setting_get_secret_flags() looks whether we have a suitable "-flags" data value, or whether we have a secret with that name. In fact, we know this is a valid secret-name. Even if there are no secret-flags and the secret (currently) does not exists. We shall not care about the return value. Note that nm_setting_get_secret_flags() also for non-secrets will set the flags to "NONE", which is just what we need.
* settings: fix for_each_secret() to check variant type of VPN secretsThomas Haller2019-01-311-0/+7
| | | | | We cannot just blindly assume that the variant is of the right type to iterate over it.
* settings: fix leaking variant in for_each_secret()Thomas Haller2019-01-311-0/+1
| | | | Fixes: df6706813a698e7a697739b0940bd8f528713aab
* manager: Fix GVariant format strings for AddAndActivate2 return valueBenjamin Berg2019-01-291-2/+2
| | | | | | | | | | AddAndActivate2 returns an empty a{sv} dictionary for extensibility. The format strings to create the methods return value were slightly wrong, causing assertion failures. Fixes: fbb038af5e5d675c994de26da676edfd8e73ffbe https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/73
* po: update Brazilian Portuguese (pt_BR) translationRafael Fontenelle2019-01-291-962/+1014
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/71
* wifi-p2p: don't assert for pending action 'waiting-for-supplicant' in ↵Thomas Haller2019-01-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nm_device_p2p_wifi_set_mgmt_iface() <info> [1548688998.8282] device (wlan0): supplicant interface state: starting -> ready <debug> [1548688998.8282] device[0x55bd55f19f30] (p2p-dev-wlan0): P2P: Releasing WPA supplicant interfaces. <debug> [1548688998.8282] device[0x55bd55f19f30] (p2p-dev-wlan0): P2P: WPA supplicant management interface changed to /fi/w1/wpa> <warn> [1548688998.8282] device (p2p-dev-wlan0): remove_pending_action (0): 'waiting-for-supplicant' not pending file src/devices/nm-device.c: line 14134 (nm_device_remove_pending_action): should not be reached #0 0x00007f2c58dad1e5 n/a (libglib-2.0.so.0) #1 0x00007f2c58dae51d g_logv (libglib-2.0.so.0) #2 0x00007f2c58dae6f3 g_log (libglib-2.0.so.0) #3 0x000055bd55246104 nm_device_remove_pending_action (NetworkManager) #4 0x00007f2c487c4864 nm_device_p2p_wifi_set_mgmt_iface (libnm-device-plugin-wifi.so) #5 0x00007f2c58e94c73 n/a (libgobject-2.0.so.0) #6 0x000055bd55233112 constructor (NetworkManager) #7 0x00007f2c58e94e8b n/a (libgobject-2.0.so.0) #8 0x00007f2c58e96fde g_object_new_valist (libgobject-2.0.so.0) #9 0x00007f2c58e9733d g_object_new (libgobject-2.0.so.0) #10 0x00007f2c487c4a65 nm_device_p2p_wifi_new (libnm-device-plugin-wifi.so) #11 0x00007f2c487c6655 recheck_p2p_availability (libnm-device-plugin-wifi.so) #12 0x00007f2c487c9119 supplicant_iface_state_cb (libnm-device-plugin-wifi.so) #13 0x00007f2c58525ace ffi_call_unix64 (libffi.so.6) #14 0x00007f2c5852548f ffi_call (libffi.so.6) #15 0x00007f2c58e903a6 g_cclosure_marshal_generic_va (libgobject-2.0.so.0) #16 0x00007f2c58e8f636 n/a (libgobject-2.0.so.0) #17 0x00007f2c58eabb01 g_signal_emit_valist (libgobject-2.0.so.0) Fixes: 00e64d13320f5848a757765c8541e8160aa8e3e2
* NEWS: merge branch 'benzea/news-updates'Thomas Haller2019-01-281-0/+2
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/70
| * NEWS: Add an entry for Wi-Fi P2PBenjamin Berg2019-01-281-0/+1
| |
| * NEWS: Add an entry for NMKeepAlive and DBus client bindingBenjamin Berg2019-01-281-0/+1
|/
* libnm-core: fix team link-watcher struct layoutBeniamino Galvani2019-01-281-1/+1
| | | | | | | | | | As the comment above the union says, structs in the union must have the same layout of arp_ping. 'vlanid' is in the wrong place and breaks that. Fixes: f44c793f6cd89c3e84e83872478daf286821ed64 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/110
* wifi-p2p: merge branch 'benzea/p2p-wifi'Thomas Haller2019-01-2743-85/+4515
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/24
| * libnm: Expose the P2PPeer WfdIEs propertyBenjamin Berg2019-01-273-2/+52
| |
| * libnm: Add routines to start/stop a P2P find operationBenjamin Berg2019-01-274-0/+98
| |
| * core/devices: Add DBus methods to start/stop a P2P findBenjamin Berg2019-01-271-0/+79
| | | | | | | | | | By default the find will run for 30s. This can be increased or decreased in the range of 1-600s by setting "Timeout" in the options parameter.
| * libnm: Add NMDeviceP2PWifiBenjamin Berg2019-01-2710-0/+564
| |
| * libnm: Add class to handle P2P peersBenjamin Berg2019-01-279-0/+673
| | | | | | | | | | This adds the introspection data and P2P peer handling to libnm. To be usable the P2P device handling is also needed.
| * core/devices: Automatically create P2P device for wifi devicesBenjamin Berg2019-01-273-1/+109
| | | | | | | | | | If a wifi device supports P2P mode, then create a further P2P device for it automatically.
| * core/devices: Add P2P Wifi device and peer trackingBenjamin Berg2019-01-2716-84/+2532
| | | | | | | | This only adds the new device type and simple peer list handling.
| * core: Add basic P2P Wi-Fi SettingsBenjamin Berg2019-01-2718-0/+410
|/ | | | | The support is rather basic and only allows connecting to a specific peer. However, this is actually already enough for many usecases.
* ppp-manager: fix a typo in a debugging statementLubomir Rintel2019-01-271-2/+2
| | | | | | | | | Discovered by GCC 9: src/ppp/nm-ppp-manager.c: In function ‘_ppp_manager_start’: ./src/nm-logging.h:59:9: error: ‘%s’ directive argument is null [-Werror=format-overflow=] Fixes: 35d9169c3c4a0361c363eca8a34ed6c575a620f1
* gitlab-ci: add test with Fedora:latest imageThomas Haller2019-01-271-0/+15
|
* clients: update settings doc header fileBeniamino Galvani2019-01-251-1/+1
|
* libnm-core: fix gtk-doc commentBeniamino Galvani2019-01-251-1/+1
| | | | Fixes: d81e10942fda8b6cb163fc1d631cd44eb35e3b91
* all: fix misspellingsRafael Fontenelle2019-01-2421-35/+35
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/64
* Merge branch 'master' into 'master'Lubomir Rintel2019-01-241-585/+589
|\ | | | | | | | | Update Ukrainian translation See merge request NetworkManager/NetworkManager!66
| * Update Ukrainian translationYuri Chornoivan2019-01-241-585/+589
|/
* po/de: fix typoDennis Brakhane2019-01-241-1/+1
| | | | https://github.com/NetworkManager/NetworkManager/pull/289
* release: bump version to 1.15.2 (development)1.15.2-devThomas Haller2019-01-222-2/+2
|
* all: merge branch 'th/various-for-wireguard-1'Thomas Haller2019-01-2213-291/+539
|\ | | | | | | https://github.com/NetworkManager/NetworkManager/pull/282
| * libnm: minor cleanup releasing setting from NMConnectionThomas Haller2019-01-221-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two callers that are concerned with disconnecting/releasing a setting: - _setting_release_hfr() (formerly _setting_release()) - _nm_connection_add_setting() for the @s_old setting Compared to one caller that connects/adds a setting (_nm_connection_add_setting()). Refactor the two callers to use the same helper function (_setting_release()) so that the implementation of how to release a setting is at one place. This patch was originally done when adding another signal to NMSetting. That did not happen (yet), but the refactoring still makes sense.
| * libnm: fix unregistering signal handler of NMConnection from NMSettingThomas Haller2019-01-221-1/+1
| | | | | | | | | | | | Seems we didn't actually unregister the signal handlers. Ups. Fixes: dfba4ce1e1c5bd0c1ae798bc538b5fab3e3faded
| * libnm: always call clear_secrets() function for all propertiesThomas Haller2019-01-223-69/+80
| | | | | | | | | | | | | | | | | | | | | | | | And merge it with the version that uses no flags. Previously, clear_secrets(_with_flags()) was only implemented by NMSettingVpn. All other settings would only consider GObject-based properties. As we will add secrets that have no GObject property, call the virtual function always, so that the setting can hook into this (for WireGuard peers).
| * libnm: merge _nm_setting_clear_secrets() and *_with_flags()Thomas Haller2019-01-223-71/+28
| |
| * libnm: fix secret-name parameter in NMSettingClearSecretsWithFlagsFn for VPNThomas Haller2019-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | The secret name should be the one that we can pass to nm_setting_get_secret_flags(). It's wrong to call the function repeatedly with secret-name "secrets". Probably nobody cared anyway about the name. nm_connection_clear_secrets_with_func() is used to clear secrets based on the flags, not the secret-name. Fixes: 2b2404bbef00abf247f1246e146fc873a90a5265
| * libnm: support nm_setting_duplicate() for non-GObject base propertiesThomas Haller2019-01-222-49/+72
| | | | | | | | | | | | | | | | | | Add a hook so that we can overwrite the property info. Yes, this is an API/ABI change for NMSettingClass, which is in a header file. But this is not API that we want to support. Users must not use this. Alternatively, I could hook the callback into NMSettInfoSetting, but either works.
| * libnm/trivial: rename local variableThomas Haller2019-01-221-35/+40
| |
| * platform: add @replace_peers argument to nm_platform_link_wireguard_change()Thomas Haller2019-01-224-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | The caller may not wish to replace existing peers, but only update/add the peers explicitly passed to nm_platform_link_wireguard_change(). I think that is in particular interesting, because for the most part NetworkManager will configure the same set of peers over and over again (whenever we resolve the DNS name of an IP endpoint of the WireGuard peer). At that point, it seems disruptive to drop all peers and re-add them again. Setting @replace_peers to %FALSE allows to only update/add.
| * platform: add and use nm_sock_addr_union_to_string()Thomas Haller2019-01-223-19/+59
| | | | | | | | | | | | | | | | | | | | We still don't use getnameinfo(). This is used for logging, where we want to see a string representation that is as close as possible to the actual bytes (to spot differences). It should not be obfuscated by a libc function out of our control. Also fix the notation for the IPv6 scope ID to use the common '%' character.
| * platform: support missing endpoint in _wireguard_create_change_nlmsgs()Thomas Haller2019-01-221-9/+10
| |
| * platform: improve API of sockaddr handlingThomas Haller2019-01-223-39/+171
| | | | | | | | | | | | | | | | | | Add cmp/hash functions that correctly honor the well known fields, instead of doing memcmp/memcpy of the entire sockaddr structure. Also, move the set function to nm_sock_addr_union_cpy() and nm_sock_addr_union_cpy_untrusted(). This also gets it right to ensure all bytes of the union are initialized (to zero).
| * shared: add "struct in_addr" union member to NMIPAddr structThomas Haller2019-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMIPAddr is a union of IPv4 and IPv6 addresses. A lot of our internal API handles IPv4 as in_addr_t / guint32 / be32_t types, as such the union field "addr4" is just a plain number. Possibly the internal API should be all refactored to prefer "struct in_addr" instead, but that is yet to be done. Anyway, at a few places we will need also access to the IPv4 address in form of a `struct in_addr`. Add an alias for that. I am not too happy about the resulting naming. It would be nicer to have struct in_addr addr4; struct in6_addr addr6; in_addr_t s_addr4; but for now, don't do such renaming.
| * shared: suppress -Wstringop-truncation warning in nm_strndup_a()Thomas Haller2019-01-222-1/+61
|/ | | | | The compiler is too smart for nm_strndup_a(). The code is correct, suppress "-Wstringop-truncation" warning.
* libnm/manager: free the error correctlyLubomir Rintel2019-01-211-1/+1
| | | | Fixes: fbb038af5e5d675c994de26da676edfd8e73ffbe
* libnm-core/setting-ip-config: drop an unused variableLubomir Rintel2019-01-211-1/+0
| | | | | | | | | Upsets clang: libnm-core/nm-setting-ip-config.c:2688:43: error: unused variable 'setting_class' [-Werror,-Wunused-variable] nm_auto_unref_gtypeclass NMSettingClass *setting_class = g_type_class_ref (NM_TYPE_SETTING_IP_CONFIG); Fixes: a3d6976efcb0b05fe304643c466df12b5ee56f9d
* initrd/trivial: fix whitespaceThomas Haller2019-01-211-1/+1
|
* initrd: make the default connection activatable on multiple devicesLubomir Rintel2019-01-212-1/+24
| | | | | | | The ip=dhcp (without a device name given) and such should activate all possible devices. https://github.com/NetworkManager/NetworkManager/pull/284
* supplicant: don't set PMF when the supplicant doesn't support itBeniamino Galvani2019-01-171-3/+6
| | | | | | | | When the supplicant does not support PMF we wrongly set 'ieee80211w=0', but since the option is not recognized the connection fails. Don't set it when unsupported. Fixes: a9ab50efb10dfb50cfe897c58afa300f8b07f6ba