summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* session-monitor: don't use GIOChannel to watch plain file descriptorth/unix-fd-sourceThomas Haller2020-01-091-9/+13
|
* lndp: don't use GIOChannel to watch plain file descriptor for socketThomas Haller2020-01-091-14/+19
|
* platform: don't use GIOChannel to watch plain file descriptor for netlink socketThomas Haller2020-01-091-21/+17
|
* acd: don't use GIOChannel to watch plain file descriptor for event fdThomas Haller2020-01-091-13/+21
|
* dhcp/nettools: don't use GIOChannel to watch plain file descriptor for event fdThomas Haller2020-01-091-7/+11
|
* bluez: don't use GIOChannel to watch plain file descriptor for rfcommThomas Haller2020-01-091-11/+12
|
* bluez: don't use GIOChannel to watch plain file descriptorThomas Haller2020-01-091-41/+48
| | | | | Also, don't track the GSource via the guint ID but the full GSource pointer.
* cli: don't use GIOChannel to watch plain file descriptor for ↵Thomas Haller2020-01-091-7/+13
| | | | nmc_readline_helper()
* tui: don't use GIOChannel to watch plain file descriptor for key pressThomas Haller2020-01-091-14/+10
|
* shared/udev: don't use GIOChannel to watch plain file descriptorThomas Haller2020-01-091-11/+9
|
* all: use nm_g_unix_fd_source_new() instead of g_unix_fd_source_new()Thomas Haller2020-01-094-23/+37
| | | | | Its source-func argument has the right signature. Otherwise, this is an easy to make mistake.
* shared: add nm_g_unix_fd_source_new() helperThomas Haller2020-01-092-1/+28
|
* platform: use NM_MAKE_STRV() in NMLinuxPlatform:constucted()Thomas Haller2020-01-091-1/+1
|
* shared: use G_SOURCE_FUNC() macro in "shared/nm-test-utils-impl.c"Thomas Haller2020-01-091-1/+1
|
* tui: fix signature for nmt_newt_form_keypress_callback() callbackThomas Haller2020-01-091-1/+1
| | | | Fixes: 3bda3fb60c10 ('nmtui: initial import of nmtui')
* po: update Ukrainian (uk) translationYuri Chornoivan2020-01-091-1308/+1309
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/388
* license: add Beniamino Galvani to RELICENSE.mdThomas Haller2020-01-091-0/+1
| | | | https://mail.gnome.org/archives/networkmanager-list/2020-January/msg00011.html
* n-dhcp4: use C_CLAMP() macro instead of c_clamp()Beniamino Galvani2020-01-091-1/+1
| | | | | | | | | | | | | | | The latter requires __auto_type which is not available in GCC versions older than 4.9. Fix the following compile error on RHEL 7.8: CC src/src_libNetworkManagerBase_la-NetworkManagerUtils.lo shared/n-dhcp4/src/n-dhcp4-c-probe.c: In function 'n_dhcp4_client_probe_transition_nak': shared/n-dhcp4/src/n-dhcp4-c-probe.c:1008:17: error: unknown type name '__auto_type' probe->ns_nak_restart_delay = c_clamp(probe->ns_nak_restart_delay * 2, ^ shared/n-dhcp4/src/n-dhcp4-c-probe.c:1008:17: error: unknown type name '__auto_type' shared/n-dhcp4/src/n-dhcp4-c-probe.c:1008:17: error: unknown type name '__auto_type' Fixes: 218782a9a3c3 ('n-dhcp4: restart the transaction after a NAK')
* license: add RELICENSE.md file to track consent/disapproval for relicensing ↵th/relicenseThomas Haller2020-01-091-0/+74
| | | | under LGPL-2.1+
* platform,device: merge branch 'th/device-ip-tunnel-mac'Thomas Haller2020-01-0910-1129/+618
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/377
| * core: set MAC address for IP tunnels when creating deviceThomas Haller2020-01-092-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is however a serious issue currently: when NetworkManager creates virtual devices, it starts from an unrealized NMDevice, creates the netdev device, realizes the device, and transitions through states UNMANAGED and DISCONNECTED. Thereby, the state of NMDevice gets cleared again. That means, if the profile has "connection.stable-id=${RANDOM}" and "ethernet.cloned-mac-address=stable", then we will first set a random MAC address when creating the device. Then, the NMDevice transitions through UNMANAGED state, forgets the MAC address it generated and creates a new MAC address in stage 1. This should be fixed by better handling unrealized devices. It also affects all software devices that set the MAC address upon creation of the interfaces (as they all should).
| * platform: support setting MAC address during nm_platform_link_gre_add()Thomas Haller2020-01-093-3/+10
| | | | | | | | We should set the MAC address of devices early on, and not later.
| * platform: drop NMPlatformLnkMacvtap typedefThomas Haller2020-01-094-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In several cases, the layer 2 and layer 3 type are very similar, also from kernel's point of view. For example, "gre"/"gretap" and "ip6tnl"/"ip6gre"/"ip6gretap" and "macvlan"/"macvtap". While it makes sense that these have different NMLinkType types (NM_LINK_TYPE_MACV{LAN,TAP}) and different NMPObject types (NMPObjectLnkMacv{lan,tap}), it makes less sense that they have different NMPlatformLnk* structs. Remove the NMPlatformLnkMacvtap typedef. A typedef does not make things simpler, but is rather confusing. Because several API that we would usually have, does not exist for the typedef (e.g. there is no nm_platform_lnk_macvtap_to_string()). Note that we also don't have such a typedef for NMPlatformLnkIp6Tnl and NMPlatformLnkGre, which has the same ambiguity between the link type and the struct with the data.
| * platform: implement link_macvlan_add via nm_platform_link_add()Thomas Haller2020-01-093-89/+31
| |
| * platform: implement link_macsec_add via nm_platform_link_add()Thomas Haller2020-01-093-101/+43
| |
| * platform: implement link_ipip_add via nm_platform_link_add()Thomas Haller2020-01-093-83/+32
| |
| * platform: implement link_ip6gre_add via nm_platform_link_add()Thomas Haller2020-01-093-108/+48
| |
| * platform: implement link_ip6tnl_add via nm_platform_link_add()Thomas Haller2020-01-093-97/+45
| |
| * platform: implement link_6lowpan_add via nm_platform_link_add()Thomas Haller2020-01-093-74/+9
| |
| * platform: implement link_vxlan_add via nm_platform_link_add()Thomas Haller2020-01-094-140/+66
| |
| * platform: implement link_vlan_add via nm_platform_link_add()Thomas Haller2020-01-094-127/+76
| |
| * platform: implement link_sit_add via nm_platform_link_add()Thomas Haller2020-01-093-79/+31
| |
| * platform: implement link_gre_add via nm_platform_link_add()Thomas Haller2020-01-093-92/+45
| |
| * platform: add parent argument to nm_platform_link_add()Thomas Haller2020-01-094-14/+27
| | | | | | | | This is to set the IFLA_LINK parameter.
| * platform: move special link-add functions to headerThomas Haller2020-01-092-91/+60
| | | | | | | | | | These are thin abstractions over nm_platform_link_add(). Move them to the header.
| * platform: extend nm_platform_link_add() to accept type specific extra parameterThomas Haller2020-01-094-35/+63
| | | | | | | | This will be used to unify all link-add implementation.
| * platform: log name of link that gets added by nm_platform_link_add()Thomas Haller2020-01-091-4/+6
| |
| * device: avoid assertion failure when setting MAC address of unexpected ↵Thomas Haller2020-01-091-2/+4
|/ | | | | | | | | | address length IP tunnels honor ethernet.cloned-mac-address. That is a MAC address of 6 bytes (ETH_ALEN). Note that for example for gre tunnels, kernel exposes an address 00:00:00:00. Hence, trying to set ethernet.cloned-mac-address with an gre tunnel leads to an assertion failure. Instead, report and log a regular error.
* dhcp: merge branch 'bg/nettools-fixes-pt2'Beniamino Galvani2020-01-094-5/+11
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/387
| * dhcp: nettools: handle 'retracted' event as 'expired'Beniamino Galvani2020-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The 'retracted' event is emitted when the client receives a NAK in the rebooting, requesting, renewing or rebinding state, while 'expired' means that the client wasn't able to renew the lease before expiry. In both cases the old lease is no longer valid and n-dhcp4 keep trying to get a lease, so the two events should be handlded in the same way. Note that the systemd client doesn't have a 'retracted' event and considers all NAKs as 'expired' events.
| * n-dhcp4: restart the transaction after a NAKBeniamino Galvani2020-01-092-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not enough to set the INIT state after a NAK; a timeout (ns_deferred) must be set so that it is added to the event fd. The client retries immediately the first time, so that in the successful case it gets an address quickly. To avoid flooding the network in case of servers always replying with NAKs, next attempts are done with intervals from 2 seconds to 5 minutes using exponential backoff. See also systemd commit [1]. [1] https://github.com/systemd/systemd/commit/1d1a3e0afb85478cda43670b8ed92a6db6c83f3e https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/325
| * n-dhcp4: allow calling listen() on already listening connectionBeniamino Galvani2020-01-091-0/+3
|/ | | | | | | When the client enters the INIT state, it calls listen() on the connection connection to create the packet socket. However, if the client is coming from the REBOOTING state after a NAK, the connection is already in the listening state; do nothing in such case.
* client: add nm_client_get_object_by_path() and nm_object_get_client() APIThomas Haller2020-01-085-2/+57
| | | | | | | | | | | | | | | | | | When iterating the GMainContext of the NMClient instance, D-Bus events get processed. That means, every time you iterate the context (or "return to the main loop"), the content of the cache might change completely. It makes sense to keep a reference to an NMObject instance, do something, and afterwards check whether the instance can still be found in the cache. Add an API for that. nm_object_get_client() allows to know whether the object is still cached. Likewise, while NMClient abstracts D-Bus, it should still provide a way to look up an NMObject by D-Bus path. Add nm_client_get_object_by_path() for that. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/384
* wifi: merge branch 'th/ssids-options-to-ptrarray'Thomas Haller2020-01-085-36/+129
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/385
| * device/wifi: cleanup ssids_options_to_ptrarray()th/ssids-options-to-ptrarrayThomas Haller2020-01-081-7/+8
| | | | | | | | | | | | | | | | - use proper gsize type to hold g_variant_n_children() - use cleanup attribute for GPtrArray - move variables inside nested scope where they are used
| * wifi/tests: add test for ssids_options_to_ptrarray()Thomas Haller2020-01-083-0/+67
| |
| * build: build intermediate library with core wifi for device-plugin and testsThomas Haller2020-01-082-28/+52
| | | | | | | | | | | | Don't build the same sources multiple times. The test code should statically link against the tested code, just like the device plugin that uses the code in production.
| * device/wifi: fix memleak parsing SSID arguments for "RequestScan"Thomas Haller2020-01-081-1/+2
|/ | | | | | Oddly enough, valgrind was not complaining about this leak... Fixes: 87b2d783b6c7 ('core: accept 'ssids':aay option in RequestScan() dictionary parameter')
* libnm: merge branch 'th/utils-security-valid'Thomas Haller2020-01-081-97/+87
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/382
| * libnm: let nm_utils_security_valid() reject TKIP with SAE (WPA3)Thomas Haller2020-01-081-3/+0
| | | | | | | | SAE should always use CCMP.