summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* platform: don't listen for tc netlink messagesbg/tc-platformBeniamino Galvani2021-09-141-1/+0
|
* core: rework tc sync functionsBeniamino Galvani2021-09-144-135/+35
|
* platform: add functions to delete tc qdiscs and tfiltersBeniamino Galvani2021-09-143-4/+102
|
* release: bump version to 1.33.2 (development)1.33.2-devThomas Haller2021-09-082-2/+2
|
* std-aux: add "libnm-std-aux/nm-linux-compat.h" header to avoid build errorsThomas Haller2021-09-085-4/+33
| | | | | | | | | | | | | | | | | | | | We have a copy of a few linux user space headers in `src/linux-headers`. The idea is that we want to use recent kernel API, and not depend on the kernel UAPI headers installed on the build system (and not need to workaround that). However, we may not be able to simply compile them, because they too have dependencies. For example, ../src/linux-headers/ethtool.h:1389:2: error: implicit declaration of function '__KERNEL_DIV_ROUND_UP' [-Werror=implicit-function-declaration] __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; ^ As workaround, don't include headers from "linux-headers" directly, but only include the new "libnm-std-aux/nm-linux-compat.h" adapter header, which tries to solve these incompatibilities. Fixes: 34d48d2596f7 ('platform: clear all BASE types when setting advertised modes for ethernet autoneg')
* platform: fix build using our copy of header "linux-headers/ethtool.h"Thomas Haller2021-09-081-1/+4
| | | | Fixes: 34d48d2596f7 ('platform: clear all BASE types when setting advertised modes for ethernet autoneg')
* ethtool: merge branch 'th/ethtool-autoneg-fixes'Thomas Haller2021-09-078-318/+2537
|\ | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1897004#c10 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/972
| * core: always reset ethtool autoneg/speed to fix reactivationth/ethtool-autoneg-fixesThomas Haller2021-09-061-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check whether the current setting are already as expected are wrong. The reason is that nm_platform_ethtool_set_link_settings() also sets the announced ethernet modes, but nm_platform_ethtool_get_link_settings() does not give them. That means, we cannot check whether the current link configuration is the same, because the getter doesn't give that information. Consequently, we must not skip the setting on the assumption that there is nothing to change. This bug has bad effects. If the device is currently activated with ethtool option set, then re-activating the profile will result in wrongly skipping the update.
| * platform: also set advertised modes when disabling ethernet autonegThomas Haller2021-09-061-29/+44
| | | | | | | | | | | | | | | | | | | | | | Disabling autoneg is not supported for Gigabit ethernet. But it seems that ixgbe also doesn't honor ethtool -s enp5s0f0 speed 100 duplex full autoneg off As a workaround, when we disable autoneg then always set the advertised modes too. I think (hope) that should not have a bad effect otherwise, but seems most sensible for ixgbe.
| * core: during reset of ethtool autoneg enable all modesThomas Haller2021-09-061-3/+14
| |
| * core: cleanup logging of set-link for speed/autonegThomas Haller2021-09-061-6/+3
| | | | | | | | | | | | | | | | | | | | There is no point in logging the current speed/duplex. OK, with the "*", we could at least see whether the printed values are to be set, or are currently configured on the interface. But mixing these two outputs is confusing and meaningless. Either log what we are about to do, or what the current configuration is. Not a mix of both.
| * platform: add debug logging for setting link autoneg/speedThomas Haller2021-09-061-0/+7
| |
| * platform: clear all BASE types when setting advertised modes for ethernet ↵Thomas Haller2021-09-063-12/+144
| | | | | | | | | | | | | | | | | | | | | | | | autoneg Get the list of supported flags from ethtool utility ([1]). When we enable auto-negotiation, the user may select only one mode to be advertised. But then we need to clear all other modes, the previous define BASET_ALL_MODES did not cover them all. [1] https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/tree/ethtool.c?id=7cca9692b9b0c4e2c7eb7868a7791f97202014b0#n397
| * platform: don't set lp_advertising in set_link_settings_new()Thomas Haller2021-09-061-3/+1
| | | | | | | | | | I don't understand why this was done. I don't think it's necessary nor correct.
| * platform: simplify accessing ethtool_link_settings.link_mode_masks in ↵Thomas Haller2021-09-061-10/+9
| | | | | | | | set_link_settings_new()
| * platform/build: fix linking "test-nm-platform" testThomas Haller2021-09-061-0/+2
| | | | | | | | | | | | | | | | | | libnm-platform.la depends on libnm-udev-aux and libnm-base. Only by accident this was working, because we happened to use no symbol in the test that required any of these dependencies. A small change to the test can (and will soon) change that. Fix the build to link the right library.
| * linux-headers: update nl802154.h kernel headerThomas Haller2021-09-061-255/+257
| | | | | | | | | | Taken from "include/net/nl802154.h", Linux 5.14, 7d2a07b769330c34b4deabeed939325c77a7ec2f, Aug 30, 2021.
| * linux-headers: add ethtool.h kernel headerThomas Haller2021-09-062-0/+2063
| | | | | | | | | | Taken from Linux 5.14, 7d2a07b769330c34b4deabeed939325c77a7ec2f, Aug 30, 2021.
| * code-format: exclude "src/linux-headers" from "nm-code-format.sh" scriptThomas Haller2021-09-061-3/+2
|/
* glib-aux: fix compiler error using thread-local for _nm_utils_to_string_bufferThomas Haller2021-09-061-1/+1
| | | | | | | | | | | | | On CentOS 7, gcc.x86_64 0:4.8.5-44.el7 fails compilation: In file included from ./src/libnm-glib-aux/nm-default-glib.h:69:0, from ./src/libnm-glib-aux/nm-default-glib-i18n-lib.h:13, from src/libnm-core-aux-extern/nm-libnm-core-aux.c:6: ./src/libnm-glib-aux/nm-shared-utils.h:1051:1: error: '__thread' before 'extern' _nm_thread_local extern char _nm_utils_to_string_buffer[2096]; ^ Fixes: fb94903444db ('glib-aux: mark _nm_utils_to_string_buffer at thread-local')
* core: merge branch 'th/device-cleanup-and-kernel-features'Thomas Haller2021-09-0228-572/+510
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/968
| * l3cfg/trivial: rename "NM_L3_ACD_DEFEND_TYPE_NONE" to ↵th/device-cleanup-and-kernel-featuresThomas Haller2021-09-012-7/+7
| | | | | | | | | | | | | | "_NM_L3_ACD_DEFEND_TYPE_NONE" This value is only used internally. It's not part of the public API of NML3Cfg, and not a value that users could/should set.
| * l3cfg: simplify creating l3cd for NML3IPv4LLThomas Haller2021-08-311-33/+15
| |
| * l3cfg: various minor cleanup to NML3Cfg/NML3ConfigDataThomas Haller2021-08-314-48/+61
| |
| * core: refactor nm_utils_ipv6_addr_set_stable_privacy() to not failThomas Haller2021-08-315-115/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's great to have functions that cannot fail, because it allows to skip any error handling. _set_stable_privacy() as it was could not fail, so the only reason why nm_utils_ipv6_addr_set_stable_privacy() could fail is because the DAD counter exhausted. Also, it will be useful to have a function that does not do the counter check, where the caller wants to handle that differently. Rename some functions, and make the core nm_utils_ipv6_addr_set_stable_privacy() not failable.
| * all: pass pointer to "struct NMUtilsIPv6IfaceId" to functions instead of structThomas Haller2021-08-317-26/+25
| | | | | | | | | | | | | | | | | | | | While NMUtilsIPv6IfaceId is only 8 bytes large, it seems unidiomatic to pass the plain struct around. With a "const NMUtilsIPv6IfaceId *" argument it is more clear what the meaning of this is. Change to use pointers.
| * platform: require RTA_PREF support in kernelThomas Haller2021-08-317-53/+23
| | | | | | | | | | | | | | The preference for IPv6 routes was added in kernel v4.1, 22 June 2015. It is even in latest RHEL7 kernels. Drop trying to be compatible with such old kernels.
| * platform: require extended IFA_FLAGS support in kernelThomas Haller2021-08-315-69/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | We use extended IFA_FLAGS for IFA_F_MANAGETEMPADDR (IPv6) and IFA_F_NOPREFIXROUTE (IPv4 and IPv6). These flags for IPv4 were added to kernel 3.14, 30 March, 2014. The flag for IPv4 was added to kernel 4.4, 11 January 2016. Even latest RHEL-7 kernels have backport for IFA_F_NOPREFIXROUTE for IPv4 (rh#1221311). Drop this. The backward compatibility code paths are likely broken anyway, and add considerable complexity.
| * platform: require IFLA_INET6_ADDR_GEN_MODE support in kernelThomas Haller2021-08-315-38/+6
| | | | | | | | | | | | | | | | | | | | | | | | This is supported since kernel 3.17, dated 5 October, 2014. Drop the backward compatibility for that. It's very hard to sensibly support a mode where we set the interface up, but prevent kernel from enabling IPv6. We would hack around that by disabling IPv6 altogether. But these code paths are not tested and likely make no sense. And it's hard to implement a sensible behavior in this case anyway.
| * platform: rename "user_ipv6ll" API to "inet6_addr_gen_mode"Thomas Haller2021-08-316-62/+74
| | | | | | | | | | | | | | | | | | | | | | The term "user_ipv6ll" is confusing and not something somebody familiar with kernel or `ip -d link` would understand. Also, it maps a boolean to addr-gen-mode "none" or "eui64", although there are 2 more address generation modes in kernel. Don't abstract the underlying API, and name things as they are in kernel.
| * device: setup firewall zone inside stage3_ip_config_start()Thomas Haller2021-08-311-48/+51
| | | | | | | | nm_device_activate_schedule_stage3_ip_config_start() should only... schedule.
| * device/ppp: rework IP config result handling for NMDevicePppThomas Haller2021-08-311-22/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMDevice's act_stage3_ip_config_start() has an out parameter, so that an NMIPConfig object can be returned. That is (luckily) not used much, and it's fundamentally flawed. We want that the start method becomes simpler and idempotent. That argument is problematic there. Instead, of the result is already ready, postpone the activation and process the return on an idle handler. Why not use nm_device_set_dev2_ip_config() to pass the configuration? Good question, who knows? For now, just mimic the previous behavior. Usually the IP configuration would be announced late, so we can just do that artificially by scheduling an idle action.
| * device/wwan: don't pass device class to nm_modem_stage3_ip4_config_start()Thomas Haller2021-08-314-26/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea, that callers to nm_modem_stage3_ip4_config_start() pass a NMDeviceClass, which then might invoke a virtual function on the class is really bad. nm_modem_stage3_ip4_config_start() should indicate what the caller should do. The main problem is, that act_stage3_ip_config_start() is not supposed to be called by anybody except NMDevice. It's an internal hook, not for NMModem's concern.
| * device: minor cleanup of dispatching function in ↵Thomas Haller2021-08-311-3/+5
| | | | | | | | nm_device_activate_schedule_ip_config_timeout()
| * glib-aux: mark _nm_utils_to_string_buffer at thread-localThomas Haller2021-08-312-2/+2
| | | | | | | | | | | | | | | | We possibly should refactor our code to no use _nm_utils_to_string_buffer, but instead always provide a suitable (stack allocated?) buffer. Until that is done, make the buffer thread local so that it avoids the most obvious problem (of resulting in non-thread-safe code).
| * platform: avoid global buffer for nm_platform_link_inet6_addrgenmode2str()Thomas Haller2021-08-311-1/+2
| |
| * platform: add nm_clear_nmp_object_up_cast(), nmp_object_ref_set_up_cast() ↵Thomas Haller2021-08-311-0/+33
| | | | | | | | | | | | | | | | helpers It can be convenient to track a NMPObject in form of their down-cast pointers. When doing that, it's useful to have clear/ref-set helpers that operate on such pointers and up-cast first.
| * platform/trivial: code style fix for NMPCacheIdType enumThomas Haller2021-08-311-16/+16
| |
| * platform: add NM_PLATFORM_IP[46]_ROUTE_INIT() helper macrosThomas Haller2021-08-311-0/+4
| |
| * libnm/tests: replace NM_PRAGMA_WARNING_DISABLE() by _nm_unusedThomas Haller2021-08-312-12/+10
| |
| * std-aux: let nm_assert() macros return a TRUE valueThomas Haller2021-08-311-14/+16
|/ | | | | | | | | | For most purposes, this makes no difference. But it allows to write something like: if ( ptr && nm_assert(check_ptr(ptr)) && other_check(ptr)) ...
* core: merge branch 'th/fix-nm-sudo-symbols-for-ovs'Thomas Haller2021-08-316-25/+28
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/973
| * Revert "build: add way to keep unused symbols when linking NetworkManager"th/fix-nm-sudo-symbols-for-ovsThomas Haller2021-08-312-25/+2
| | | | | | | | | | | | | | | | This approach does not seem to work with clang 3.4 (rhel-7). Instead, make sure we actually use the symbol in NetworkManager so that it gets preserved for the OVS device plugin. This reverts commit 684f2acffea3ed5704330bff05b87acbf371ccdd.
| * core: use nm-sudo symbols in NetworkManager binary for pluginThomas Haller2021-08-311-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two nm-sudo helper functions are only used by the OVS device plugin, but they are part of NetworkManager core binary. This is done commonly, where the NetworkManager binary has symbols that are used by the plugins. But in this case, NetworkManager itself doesn't use the symbols. That will case the linker to drop them. A previous solution for that was commit 684f2acffea3 ('build: add way to keep unused symbols when linking NetworkManager'), but that doesn't seem to work with clang 3.4 (rhel-7). Instead, actually use the symbol so that it cannot be dropped.
| * build: define WITH_OPENVSWITCH in "config.h"Thomas Haller2021-08-313-0/+10
|/ | | | It will be used next.
* gitlab-ci: fix regenerating .gitlab-ci.ymlThomas Haller2021-08-301-2/+2
| | | | Fixes: 414d2c1d4b3e ('contrib,gitlab-ci: fix "contrib/fedora/REQUIRED_PACKAGES" to install "vala"')
* contrib,gitlab-ci: fix "contrib/fedora/REQUIRED_PACKAGES" to install "vala"Thomas Haller2021-08-301-0/+1
| | | | Fixes: 53562b19150c ('contrib: remove "vala-tools" from "contrib/fedora/REQUIRED_PACKAGES"')
* po: correct Hong Kong TranslationRain-lk2021-08-301-4/+4
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/971
* format: reformat code with clang-format-12.0.1-1.fc34Thomas Haller2021-08-307-25/+25
| | | | | | | | | | The formatting produced by clang-format depends on the version of the tool. The version that we use is the one of the current Fedora release. Fedora 34 recently updated clang (and clang-tools-extra) from version 12.0.0 to 12.0.1. This brings some changes. Update the formatting.
* gitlab-ci: temporarily disable Fedora 35 and 36Thomas Haller2021-08-302-67/+7
| | | | | | | | | | | | | | | | It fails to install the container. Disable it, until it is more stable. ... Install 363 Packages Total download size: 275 M Installed size: 1.1 G Downloading Packages: python3: allocatestack.c:191: advise_stack_range: Assertion `freesize < size' failed. ./contrib/fedora/REQUIRED_PACKAGES: line 17: 815 Aborted $NM_INSTALL "$@" subprocess exited with status 134 subprocess exited with status 134 exit status 134