summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* l3cfg: implement IPv4 DAD/ACD (address collision detection) in NML3Cfgth/l3cfg-6-acdThomas Haller2020-09-034-108/+1886
| | | | | | | | | | | | | | | | | | | Currently, NMDevice does ACD. It intercepts certain NMIP4Config instances, and tries to perform ACD on the addresses. I think this functionality should be handled by NML3Cfg instead. For one, NML3Cfg sees all configurations, and can perform ACD for all (relevant) addresses. Also, it moves logic away from NMDevice and makes the functionality available without an NMDevice. As such, it also will allow that independent "controllers" contribute NML3ConfigData instances and ACD will performed for all of them (as requested). This will be our implementation for IPv4 ACD (https://tools.ietf.org/html/rfc5227) based on nettools' n-acd library. The code is not actually tested yes, because NMDevice did not yet switch over to use NML3Cfg. Once that happens, surely issues with this patch will be found that will need fixing.
* platform: add nm_platform_ip4_address_addr_to_hash() helperThomas Haller2020-09-032-0/+39
| | | | | This will only have one particular use, from NNL3Cfg. However, it seems general enough to place it in "nm-platform.h".
* shared: add nm_utils_bin2hexstr_a() macroThomas Haller2020-09-031-0/+25
|
* shared: add nm_g_timeout_source_new_seconds()Thomas Haller2020-09-032-0/+23
|
* shared: add nm_g_hash_table_contains() helperThomas Haller2020-09-031-0/+6
|
* initrd/tests: fix memleak in test_dhcp_vendor_class_id()Thomas Haller2020-09-031-1/+3
| | | | | | | Having leaks in the tests, breaks running the test under valgrind. There must be no leaks. Fixes: c056cb9306be ('initrd: parse 'rd.net.dhcp.vendor-class' kernel cmdline arg')
* release: bump version to 1.27.2 (development)1.27.2-devThomas Haller2020-09-022-2/+2
|
* contrib: add git-hook to verify code-styleAntonio Cardace2020-09-021-0/+21
| | | | Signed-off-by: Antonio Cardace <acardace@redhat.com>
* scripts: better error message for nm-code-format.shAntonio Cardace2020-09-021-1/+1
| | | | Signed-off-by: Antonio Cardace <acardace@redhat.com>
* all: merge branch 'th/unify-nm-auto-macros'Thomas Haller2020-09-0216-140/+80
|\
| * shared: redefine "gs_*" cleanup macros to their "nm_auto*" counterpartsThomas Haller2020-09-021-87/+11
| |
| * all: replace cleanup macro "gs_free_slist" by "nm_auto_free_slist"Thomas Haller2020-09-023-15/+6
| |
| * all: replace cleanup macro "gs_unref_keyfile" by "nm_auto_unref_keyfile"Thomas Haller2020-09-0215-46/+38
| |
| * shared: add "nm_auto*" macros as future replacements for "gs_*" cleanup macrosThomas Haller2020-09-021-0/+33
|/ | | | | | | | | | | | We still use the "gs_*" macros that we originally got from libgsystem. libgsystem no longer exists, we only still use the names of these macros. Our own cleanup macros all follow the "nm_auto*" naming pattern. Eventually, we want to replace all uses of "gs_*" with cleanup macros that follow our naming scheme. Add the macros that will be used to replace the "gs_*" macros.
* scripts: add script to format codebase using clang-formatAntonio Cardace2020-09-021-0/+72
| | | | Signed-off-by: Antonio Cardace <acardace@redhat.com>
* man: expand DEBUGGING section in `man NetworkManager`Thomas Haller2020-09-021-10/+24
|
* man: update bug tracker in `man NetworkManager`Thomas Haller2020-09-021-1/+1
|
* core: log message about secret-key version and filenameThomas Haller2020-09-021-5/+14
|
* man: fix description of v2 secret key in `man NetworkManager`Thomas Haller2020-09-021-6/+6
| | | | Fixes: 0aa09da5f46d ('man: explain "/var/lib/NetworkManager/secret-key" in `man NetworkManager`')
* man: explain "/var/lib/NetworkManager/secret-key" in `man NetworkManager`Thomas Haller2020-09-023-1/+39
|
* shared: rename "gs_local_option_context" to "nm_auto_free_option_context"Thomas Haller2020-09-022-9/+4
| | | | | | | | | The "gs_*" macros originate from the (no longer existing) libgsystem library. We still have them, because so far we didn't go through the effort of renaming the API. Aside that oddity, our cleanup API is called "nm_auto*". There is no need to add new API with the old name.
* initrd: fix memory leakAntonio Cardace2020-09-012-1/+9
| | | | | Signed-off-by: Antonio Cardace <acardace@redhat.com> Fixes: 9f9609555d1c ('initrd: add configuration generator')
* shared/trivial: add code comment about the purpose of "nm-default.h" headerThomas Haller2020-09-011-0/+10
|
* libnm: fix order of includes in ↵Thomas Haller2020-09-011-3/+2
| | | | "libnm-core/nm-libnm-core-intern/nm-libnm-core-utils.c"
* initrd: merge branch 'ac/dhcpclass-initrd'Antonio Cardace2020-09-017-52/+118
|\ | | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/614 Signed-off-by: Antonio Cardace <acardace@redhat.com>
| * initrd: parse 'rd.net.dhcp.vendor-class' kernel cmdline argac/dhcpclass-initrdAntonio Cardace2020-09-012-0/+53
| | | | | | | | | | | | | | | | | | This arguments makes NM set the ipv4.dhcp-vendor-class-identifier property for all connections. https://bugzilla.redhat.com/show_bug.cgi?id=1872299 Signed-off-by: Antonio Cardace <acardace@redhat.com>
| * core: add 'dhcp-vendor-class-identifier' validation functionAntonio Cardace2020-09-015-52/+65
|/ | | | | | So that it can be reused. Signed-off-by: Antonio Cardace <acardace@redhat.com>
* po: update Ukrainian (uk) translationYuri Chornoivan2020-08-311-1109/+1015
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/615
* contrib: accept missing .sig file for older releases in "release.sh"Thomas Haller2020-08-311-2/+5
| | | | | On older branches, the build script does not create a GPG signature of the release tarball. Let the release script be graceful against that.
* device: fix autoactivating virtual devices after a failureBeniamino Galvani2020-08-311-0/+5
| | | | | | | | | | | | | | | | | | | When a virtual device fails, its state goes to FAIL and then DISCONNECTED. In DISCONNECTED we call schedule_activate_check() to schedule an auto-activation if needed. We also schudule the deletion of the link through delete_on_deactivate_check_and_schedule(). The auto-activation attempt fails because the link deletion unmanages the device; as a result, the device doesn't try to auto-activate again. To fix this: - don't allow the device to auto-activate if the device deletion is pending; - check again if the device can be auto-activated after its deletion. https://bugzilla.redhat.com/show_bug.cgi?id=1818697 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/613
* dhcp: workaround "maybe-uninitialized" in dhcp_event_cb()Thomas Haller2020-08-281-1/+1
| | | | | | | | | | | | | | With LTO we get a compiler warning: src/dhcp/nm-dhcp-systemd.c: In function dhcp_event_cb: src/dhcp/nm-dhcp-systemd.c:554: error: lease may be used uninitialized in this function [-Werror=maybe-uninitialized] 554 | r = sd_dhcp_lease_get_server_identifier (lease, &addr); | src/dhcp/nm-dhcp-systemd.c:528: note: lease was declared here 528 | sd_dhcp_lease *lease; | Fixes: 7f217d0345f5 ('core: honor the ipv4.dhcp-reject-servers property')
* gitlab-ci: fix workarounds for Ubuntu 16.04 in testsThomas Haller2020-08-282-3/+3
| | | | | | | The detection for Ubuntu 16.04 was broken. By now /etc/os-release contains VERSION="16.04.7 LTS (Xenial Xerus)"
* device: fix casting pointer to enum for sriov_reset_on_deactivate_cb()Thomas Haller2020-08-281-2/+2
| | | | | | | | | | Avoids a compiler warning: ../src/devices/nm-device.c:16079:26: error: cast to smaller integer type 'NMDeviceStateReason' from 'gpointer' (aka 'void *') [-Werror,-Wvoid-pointer-to-enum-cast] deactivate_ready (self, (NMDeviceStateReason) reason); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 121c58f0c48d ('core: set number of SR-IOV VFs asynchronously')
* core/trivial: replace "XXX" markers with "TODO"Thomas Haller2020-08-275-9/+9
| | | | | | | | | "XXX" is used for tagging parts of code that still need work before merging a patch. If you want to highlight/mark a comment which is merged use either "TODO" or "FIXME". Of course, even "TODO" and "FIXME" should be avoided in favor of just doing/fixing it. Such things tend to never be done/fixed.
* dhcp: merge branch 'bg/dhcp-reject-servers'Beniamino Galvani2020-08-2629-569/+1081
|\ | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1827410 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/581
| * dhcp: nettools: change event handler signatureBeniamino Galvani2020-08-261-6/+4
| |
| * core: honor the ipv4.dhcp-reject-servers propertyBeniamino Galvani2020-08-2612-2/+122
| |
| * all: add ipv4.dhcp-reject-servers propertyBeniamino Galvani2020-08-2612-520/+896
| | | | | | | | | | | | Add a new dhcp-reject-servers property to the ipv4 setting, that allows specifying a list of server-ids from which offers should be rejected.
| * n-dhcp4: add n_dhcp4_client_lease_get_server_identifier()Beniamino Galvani2020-08-263-0/+28
| | | | | | | | Add new API to query the server identifier of a lease.
| * libnm-core: use nm_strvarray_remove_first()Beniamino Galvani2020-08-261-44/+16
| |
| * shared: add nm_strvarray_remove_first()Beniamino Galvani2020-08-261-0/+18
|/ | | | Co-authored-by: Thomas Haller <thaller@redhat.com>
* libnm: move nm_setting_ip4_config_get_dhcp_vendor_class_identifier() to ↵Antonio Cardace2020-08-261-2/+6
| | | | | | | | | | | | | | "libnm_1_26_4" nm_setting_ip4_config_get_dhcp_vendor_class_identifier() was backported to nm-1-26 branch, and will be released as 1.26.4. As such, on the stable branch the symbol will be placed in a separate symbol version ("libnm_1_26_4"). To support the upgrade path from 1.26.4+ to 1.28+, we want this symbol also present on master. Signed-off-by: Antonio Cardace <acardace@redhat.com>
* dhcp: merge branch 'ac/dhcp_vendor_class_opt'Antonio Cardace2020-08-2622-554/+935
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/610
| * dhcp: implement dhcp-vendor-class-identifier option for systemd's DHCPAntonio Cardace2020-08-261-0/+19
| | | | | | | | | | | | | | client https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
| * dhcp: implement dhcp-vendor-class-identifier option for internal DHCP clientAntonio Cardace2020-08-261-0/+20
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
| * core: add support for dhcpv4 vendor class identifier optionAntonio Cardace2020-08-267-16/+96
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
| * ifcfg-rh: add support for the DHCP_VENDOR_CLASS_IDENTIFIER optionAntonio Cardace2020-08-264-1/+12
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
| * libnm-core,clients: add support for ipv4.dhcp-vendor-class-identifier optionAntonio Cardace2020-08-269-537/+788
|/ | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
* shared: avoid multiple strlen() calls in _nm_utils_strv_dup_packed()Thomas Haller2020-08-251-10/+22
| | | | | | | Instead of calling strlen() for all strings twice, remember the length in a temporary buffer. Yes, this is measurably faster.
* shared: add nm_utils_strv_dup_packed() utilThomas Haller2020-08-253-0/+119
|