Commit graph

30961 commits

Author SHA1 Message Date
Lubomir Rintel
bf9a1bedb8 nm-setting: mangle public constant to make g-ir-scanner happy
Some versions of g-ir-scanner's C parser silently coerce unrecognized
symbols into zeroes [1]. Let's avoid that so that we don't end up with
wrong constants in our Gir data.

[1] https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/366

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1446
(cherry picked from commit 08e845f651)
2022-11-11 16:49:39 +01:00
Thomas Haller
46c27a270f
ifcfg-rh: merge branch 'th/ethtool-ifcfg-fixes'
https://bugzilla.redhat.com/show_bug.cgi?id=2134569

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1452

(cherry picked from commit 954ca6b411)
2022-11-10 13:49:32 +01:00
Thomas Haller
ee6bf84559
core: filter out invalid Wake-On-Lan flags
NMSettingWired does not reject invalid flags. Filter them out in wake_on_lan_enable().
In practice, it makes no difference, the unknown flags were ignored anyway.

(cherry picked from commit c593834842)
2022-11-10 13:49:30 +01:00
Thomas Haller
40564c5d6a
ifcfg-rh: fix persisting all-default NMSettingEthtool with autoneg/wol flags
Fixes: 26ed9e6714 ('ifcfg-rh: fix persisting all-default NMSettingEthtool settings')
(cherry picked from commit 4303d33727)
2022-11-10 13:49:30 +01:00
Thomas Haller
553e037220
ifcfg-rh: fix persisting ethtool options
If there were any pause options and any non-pause options,
the created setting was invalid.

I don't think it's reasonably possible to parse the broken settings.
So there is no workaround trying to read the existing broken settings
from disk. Luckily, the broken setting was just silently ignored by
the parser, so you simply could not persist certain settings.

https://bugzilla.redhat.com/show_bug.cgi?id=2134569

Fixes: 652ddca04c ('ethtool: Introducing PAUSE support')
(cherry picked from commit 21661c6f71)
2022-11-10 13:49:29 +01:00
Thomas Haller
3b3ed9f1cc
ifcfg-rh/tests: add test checking persisting ethtool settings to ifcfg-rh
There are still various failures. That will be fixed next.

(cherry picked from commit 3755e6b175)
2022-11-10 13:49:29 +01:00
Thomas Haller
a14aa08a43
ethtool: add and use nm_ethtool_id_get_variant_type() helper
(cherry picked from commit a0370e0efa)
2022-11-10 13:49:17 +01:00
Ratchanan Srirattanamet
a8813ff6fe
wwan/ofono: fix memory leak in handle_settings()
[thaller@redhat.com: modified original patch.]

Fixes: 58287cbcc0 ('core: rework IP configuration in NetworkManager using layer 3 configuration')
(cherry picked from commit 61e99ed715)
2022-11-10 09:16:13 +01:00
Thomas Haller
0797b26846
platform: fix nmp_object_copy(id_only) for object that don't implement cmd_plobj_id_copy()
The if-else-if was wrong. It meant that if an object did not implement
cmd_plobj_id_copy(), nothign was copied (for id-only).

I think this code path was not actually hit, because we never clone
an object only by ID.

Fixes: c91a4617a1 ('nmp-object: allow missing implementations for certain virtual functions')
(cherry picked from commit ee34eeafb9)
2022-11-10 08:05:13 +01:00
Lubomir Rintel
a18ec9df72
client: add_and_activate*() allow NULL device
Fix up the doc comment so that the gir data gets that right.

Fixes: 90d0ae0faf ('libnm: implement nm_client_activate_connection()/nm_client_add_and_activate_connection*() by using GDBusConnection directly')
(cherry picked from commit a0373a72db)
2022-11-10 08:02:38 +01:00
Beniamino Galvani
3fd8116646 std-aux: fix NM_LIKELY()/NM_UNLIKELY() macros
Fix this compile error when "defined(__GNUC__) && (__GNUC__ > 2) &&
defined(__OPTIMIZE__)" doesn't match:

  In file included from ../src/libnm-std-aux/nm-default-std.h:102,
                   from ../src/libnm-std-aux/nm-std-utils.c:3:
  ../src/libnm-std-aux/nm-std-aux.h: In function ‘NM_ALIGN_TO’:
  ../src/libnm-std-aux/nm-std-aux.h:160:6: error: expected expression before ‘{’ token
    160 |     ({                                 \
        |      ^
  ../src/libnm-std-aux/nm-std-aux.h:169:31: note: in expansion of macro ‘_NM_BOOLEAN_EXPR_IMPL’
    169 | #define NM_BOOLEAN_EXPR(expr) _NM_BOOLEAN_EXPR_IMPL(NM_UNIQ, expr)
        |                               ^~~~~~~~~~~~~~~~~~~~~
  ../src/libnm-std-aux/nm-std-aux.h:175:27: note: in expansion of macro ‘NM_BOOLEAN_EXPR’
    175 | #define NM_LIKELY(expr)   NM_BOOLEAN_EXPR(expr)
        |                           ^~~~~~~~~~~~~~~
  ../src/libnm-std-aux/nm-std-aux.h:238:19: note: in expansion of macro ‘NM_LIKELY’
    238 |         } else if NM_LIKELY (cond) {                                  \
        |                   ^~~~~~~~~
  ../src/libnm-std-aux/nm-std-aux.h:449:5: note: in expansion of macro ‘nm_assert’
    449 |     nm_assert(nm_utils_is_power_of_two(ali));
        |     ^~~~~~~~~

Fixes: 030d68aef7 ('shared: add nm_assert() to "nm-std-aux.h"')
(cherry picked from commit 8bd72d5f2e)
2022-11-04 09:19:08 +01:00
Thomas Haller
de7696789e
tests: add tests for generating stable UUIDs for keyfile/initrd
(cherry picked from commit dc26e65928)
2022-11-03 21:05:36 +01:00
Thomas Haller
6de49febc3
initrd/tests: add unit test for autoconnect-priority setting
Fixes: 98575bd513 ('initrd: generate initrd generator profiles with autoconnect-priority -100')
(cherry picked from commit 28ab535617)
2022-11-03 20:55:15 +01:00
Thomas Haller
8f92a51305
gitignore: ignore "po/.Makefile.patched" file
Fixes: 7ee0da3eaf ('build: don't "update-po" during make dist')
(cherry picked from commit 1d767bb1cd)
2022-11-03 20:54:58 +01:00
Thomas Haller
9c5d413f3f
build/meson fix "gen-metadata-nm-settings-nmcli.xml.in" without enable_docs
Fixes: ab8fdb73e6 ('build: commit pre-generated "generate-docs-nm-settings-nmcli.xml" to git')
(cherry picked from commit 489f65bf9c)
2022-11-03 20:54:47 +01:00
Thomas Haller
1fe66209e9
build/autotools: adjust hack for gettext() for other Makefile versions
On rhel-8.7, we use a different gettext version, so the Makefile
looks different. Adjust patch the source.

Fixes: 7ee0da3eaf ('build: don't "update-po" during make dist')
(cherry picked from commit b2d1d14772)
2022-11-03 20:54:35 +01:00
Beniamino Galvani
7a73431608
core: fix setting IPv6 retrans timer
Fixes: 5c48c5d5d6 ('l3cfg: set IPv6 sysctls during NML3Cfg commit')
(cherry picked from commit 50b6f3d6d3)
2022-11-03 20:54:12 +01:00
Michael Catanzaro
1ebef6cabf
core: don't restrict DNS interface when performing connectivity check
Currently, when performing DNS resolution with systemd-resolved,
NetworkManager tells systemd-resolved to consider only DNS configuration
for the network interface that the connectivity check request will be
routed through. But this is not correct because DNS and routing are
configured entirely separately. For example, say we have a VPN that
receives all DNS but only a subset of routing. NetworkManager will
configure systemd-resolved with no DNS servers on any interface except
for the VPN interface, but will still route traffic through other
interfaces. This is entirely legitimate and works fine in practice,
except for the connectivity check.

To fix this, we just drop the restriction and allow systemd-resolved to
consider its full configuration, which is what gets used normally
anyway. This allows our connectivity check to match the real
configuration instead of failing spuriously.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1107

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1415
(cherry picked from commit e6dac4f0b6)
2022-10-19 21:03:58 +02:00
Beniamino Galvani
30b6c75e74 nmcli: fix crash in "nmcli device monitor"
Fix the following crash:

  $ nmcli device monitor a
  Error: Device 'a' not found.
  Segmentation fault (core dumped)

Found by coverity:

  1. NetworkManager-1.41.3/src/nmcli/devices.c:0: scope_hint: In function 'do_devices_monitor'
  2. NetworkManager-1.41.3/src/nmcli/devices.c:2932:28: warning[-Wanalyzer-null-dereference]: dereference of NULL 'devices'
     2930|       }
     2931|
     2932|->     for (i = 0; i < devices->len; i++)
     2933|           device_watch(nmc, g_ptr_array_index(devices, i));
     2934|

Fixes: 2074b28976 ('nmcli/devices: return GPtrArray instead of GSList from get_device_list()')
(cherry picked from commit 40897db056)
2022-10-19 16:13:41 +02:00
Beniamino Galvani
f9db4f4604 Revert "device: restart DHCP when the MAC changes"
The commit causes problems with bridges. When a new port is attached
the MAC of the bridge possibly changes and if we restart DHCP the
bridge will get a different IP address.

Revert the change until a better solution to the original problem is
found.

This reverts commit 905adabdba.

https://bugzilla.redhat.com/show_bug.cgi?id=2124443
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1401
(cherry picked from commit 9819738607)
2022-10-19 14:01:00 +02:00
Beniamino Galvani
4a85225c2c release: bump version to 1.40.3 (development) 2022-10-18 10:10:22 +02:00
Beniamino Galvani
4704b924ad release: bump version to 1.40.2 2022-10-18 10:10:22 +02:00
Beniamino Galvani
e93684e929 NEWS: update 2022-10-18 09:37:06 +02:00
Fernando Fernandez Mancera
310e0d259f policy: track the autoconnect retries in devices for multi-connect
For connections with multi-connect property set to "multiple", the
autoconnect-retries should be tracked per device and not per connection.
That means, if autoconnect-retries is set to 2, each device using that
connection should retry to autoconnect 2 times.

The device autoconnect retries is -2 by default. This is a special
value, in NMPolicy context, if the connection used is multi-connect the
device value will be set to match the connection retries. Each time the
device picks a different connection, it will reset the device
autoconnect retries to -2 and if needed, sync. with the connection
retries.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1387

https://bugzilla.redhat.com/show_bug.cgi?id=2039734
(cherry picked from commit 1656d82045)
2022-10-17 16:28:19 +02:00
Thomas Haller
64f6c0ae31 initrd: generate initrd generator profiles with autoconnect-priority -100
... and profiles from firmware with autoconnect-priority -200.

In general, after switch root we remember the still activated profile in
/run, and NetworkManager would take over the device with the same
profile as before. In that case, autoconnect and autoconnect-priority
doesn't matter.

Autoconnect only matters when having a device in disconnected state and
not being blocked from autoconnect. For example, if you unplug and
replug the cable. In that case, it does make sense to me that
user-provided profiles from real-root are preferred.

To me the reasons for this change is not very strong (but neither are
the reasons against it). Read the discussion on rhbz #2089707.

https://bugzilla.redhat.com/show_bug.cgi?id=2089707

Co-authored-by: Lubomir Rintel <lkundrak@v3.sk>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1376
(cherry picked from commit 98575bd513)
2022-10-17 16:26:01 +02:00
Beniamino Galvani
439f0675f2 platform: merge branch 'bg/sriov-bufsize'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1413

(cherry picked from commit 227ae41216)
2022-10-17 10:32:53 +02:00
Beniamino Galvani
a0cd931bef platform: set custom netlink buffer size when adding SR-IOV VFs
When there are many VFs the default buffer size of 1 memory page is
not enough. Each VF can take up to ~120 bytes and so when the page
size is 4KiB at most ~34 VFs can be added.

Specify the buffer size when allocating the message.

(cherry picked from commit f7ac887502)
2022-10-17 10:32:52 +02:00
Beniamino Galvani
88d9836a67 platform: add length argument to _nl_msg_new_link_full()
Add a new argument to specify the netlink buffer length.

(cherry picked from commit a4767ad771)
2022-10-17 10:32:52 +02:00
Beniamino Galvani
a228e06d99 platform: change nlmsg_alloc*() functions
Add a len argument to nlmsg_alloc() and nlmsg_alloc_simple(). After
that, nlmsg_alloc_size() can be dropped. Also, rename
nlmsg_alloc_simple() to nlmsg_alloc_new().

(cherry picked from commit f12d96f0fa)
2022-10-17 10:32:52 +02:00
Beniamino Galvani
f702be2992 ovs: wait that links disappear during initial cleanup
At startup, we remove from ovsdb any existing interface created by NM
and later an interface with the same name might be readded. This can
cause race conditions. Consider this series of events:

1. at startup NM removes the entry from ovsdb;
2. ovsdb reports success;
3. NM inserts an interface with the same name again;
4. ovs-vswitch monitors ovsdb changes, and gets events for removal and
   insertion. Depending on how those events are split in different
   batches, it might decide:
   4a. to delete the link and add it back, or
   4b. to keep the existing link because the delete and insertion
       cancel out each other.

When NM sees the link staying in platform, it doesn't know if it's
because of 4b or because 4a will happen eventually.

To avoid this ambiguity, after ovsdb reports the successful deletion
NM should also wait that the link disappears from platform.

Unfortunately, this means that ovsdb gets a dependency to the platform
code.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1386
(cherry picked from commit 4f60fe293c)
2022-10-14 11:25:59 +02:00
Beniamino Galvani
1673e3f051 core: wait for carrier before resolving hostname via DNS
If there is no carrier on a device, don't try to resolve the hostname
on it. Instead, subscribe to carrier change notifications and retry
again once carrier goes up.

https://bugzilla.redhat.com/show_bug.cgi?id=2118817
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1402
(cherry picked from commit e3cf5083fb)
2022-10-14 11:20:45 +02:00
Beniamino Galvani
925ea8b24c dns: merge branch 'bg/dns-sort'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1427

(cherry picked from commit e03b8fa447)
2022-10-14 10:46:31 +02:00
Beniamino Galvani
db4c55c8d3 dns: sort the ip-data list when a new element is added
In nm_dns_manager_set_ip_config() we try to avoid calling update_dns()
unless something changes, because updating DNS is expensive and can
trigger other actions such as a new hostname resolution.

When we add a new ip_data, even if the new element is equivalent to
the old one that was removed, we need to sort the list again.

Fixes: ce0a36d20f ('dns: better track l3cd changes')
https://bugzilla.redhat.com/show_bug.cgi?id=2098574
(cherry picked from commit 3cc7801779)
2022-10-14 10:46:31 +02:00
Beniamino Galvani
01b4040a7a dns: add comment explaining the purpose of any_removed
(cherry picked from commit 4d1ecd8d6d)
2022-10-14 10:46:31 +02:00
Beniamino Galvani
fabefd9bd5 dhcp: merge branch 'bg/dhcp6-dad-pt2'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1363
https://bugzilla.redhat.com/show_bug.cgi?id=2096386

(cherry picked from commit 12e5b944f6)
2022-10-11 21:51:27 +02:00
Beniamino Galvani
324838bee1 dhcp: implement decline on IPv6 DAD failure with dhclient
The dhclient plugin already supports sending a decline when IPv4 ACD
fails. Also implement support for IPv6 DAD.

See-also: 156d84217c ("dhcp/dhclient: implement accept/decline (ACD) for dhclient plugin")
(cherry picked from commit e4aefbc556)
2022-10-11 21:51:27 +02:00
Beniamino Galvani
b671c36189 dhcp: decline IPv6 lease if all adresses fail DAD
Currently we accept the DHCPv6 just after addresses are configured on
kernel, without waiting DAD result. Instead, wait that DAD completes
and decline the lease if all addresses are detected as duplicate.

Note that when an address has non-infinite lifetime and fails DAD,
kernel removes it automatically. With iproute2 we see something like:

602: testX6    inet6 2620:🔢5678/128 scope global tentative dynamic noprefixroute
       valid_lft 7500sec preferred_lft 7200sec
Deleted 602: testX6    inet6 2620:🔢5678/128 scope global dadfailed tentative dynamic noprefixroute
       valid_lft 7500sec preferred_lft 7200sec

Since the address gets removed from the platform cache, at the moment
we don't have a way to check the flags of the removal
message. Therefore, we assume that any address that goes away in
tentative state was detected as duplicate.

https://bugzilla.redhat.com/show_bug.cgi?id=2096386
(cherry picked from commit a7eb77260a)
2022-10-11 21:51:27 +02:00
Thomas Haller
0db1c68a36
device: fix hanging port devices when controller goes down while port is not fully attached
This partly reverts 1fe8166fc9 ('device: only deactivate when the master
we've enslaved to goes away').

If the controller fails while the port is not yet fully attached,
before this patch the following happened:

  <info>  [1664299566.1065] device (bond0): state change: ip-config -> failed (reason 'config-failed', sys-iface-state: 'managed')
  ...
  <warn>  [1664299566.1073] device (bond0): Activation: failed for connection 'bond0'
  <trace> [1664299566.1073] device[6b76ac7314eb0b53] (bond0): master: release one slave a9f10ea824bb1725/eth1 (not enslaved) (configure)
  <debug> [1664299566.1073] device[a9f10ea824bb1725] (eth1): unmanaged: flags set to [!sleeping,!by-type,!platform-init,!user-explicit,!user-settings,!user-conf=0x0/0x179/managed], forget [is-slave=0x800], reason removed)
  ...
  <info>  [1664299566.1080] device (eth1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')

Note that now eth1 has no controller, but it lingers in "ip-config" state indefinitely.

If we look at a case where the port is already attached we see:

  <info>  [1664299540.9661] device (bond0): state change: secondaries -> failed (reason 'config-failed', sys-iface-state: 'managed')
  ...
  <warn>  [1664299540.9667] device (bond0): Activation: failed for connection 'bond0'
  <trace> [1664299540.9667] device[6b76ac7314eb0b53] (bond0): master: release one slave a9f10ea824bb1725/eth1 (enslaved) (configure)
  <debug> [1664299540.9667] platform: (eth1) link: releasing 10 from master 'bond0' (80)
  ...
  <info>  [1664299540.9740] device (bond0): detached bond port eth1
  ...
  <debug> [1664299540.9749] device[a9f10ea824bb1725] (eth1): Activation: connection 'eth1' master failed
  ...
  <warn>  [1664299540.9749] device (eth1): queue-state[secondaries, reason:none, id:520]: replace previously queued state change
  ...
  <debug> [1664299540.9750] device[a9f10ea824bb1725] (eth1): queue-state[deactivating, reason:dependency-failed, id:533]: queue state change
  <debug> [1664299540.9751] device[a9f10ea824bb1725] (eth1): unmanaged: flags set to [!sleeping,!by-type,!platform-init,!user-explicit,!user-settings,!user-conf=0x0/0x179/managed], forget [is-slave=0x800], reason removed)
  ...
  <debug> [1664299541.0201] device[a9f10ea824bb1725] (eth1): enslaved to unknown device 0 (??)
  ...
  <debug> [1664299541.0227] device[a9f10ea824bb1725] (eth1): queue-state[deactivating, reason:dependency-failed, id:533]: change state
  <info>  [1664299541.0228] device (eth1): state change: ip-check -> deactivating (reason 'dependency-failed', sys-iface-state: 'managed')

Fix that by not ignoring the nm_device_slave_notify_release() call. Now we get:

  <info>  [1664391684.9757] device (bond0): state change: ip-config -> failed (reason 'config-failed', sys-iface-state: 'managed')
  ...
  <debug> [1664391684.9759] active-connection[69c2b12d61f5b171]: set state deactivated (was activating)
  <debug> [1664391684.9760] active-connection[142bb8240f6a696d]: check-master-ready: already signalled (state activating, master 0x56116f1480a0 is in state deactivated)
  ...
  <debug> [1664391684.9762] manager: ActivatingConnection now (none)
  ...
  <warn>  [1664391684.9763] device (bond0): Activation: failed for connection 'bond0'
  <trace> [1664391684.9763] device[142828814dec6e26] (bond0): master: release one slave 720791275fe8a68c/eth1 (not enslaved) (configure)
  <debug> [1664391684.9763] device[720791275fe8a68c] (eth1): Activation: connection 'eth1' master failed
  ...
  <debug> [1664391684.9764] device[720791275fe8a68c] (eth1): queue-state[deactivating, reason:dependency-failed, id:3047]: queue state change
  <debug> [1664391684.9765] device[720791275fe8a68c] (eth1): unmanaged: flags set to [!sleeping,!by-type,!platform-init,!user-explicit,!user-settings,!user-conf=0x0/0x179/managed], forget [is-slave=0x800], reason removed)
  ...
  <debug> [1664391684.9797] device[720791275fe8a68c] (eth1): queue-state[deactivating, reason:dependency-failed, id:3047]: change state
  <info>  [1664391684.9797] device (eth1): state change: config -> deactivating (reason 'dependency-failed', sys-iface-state: 'managed')

Commit 1fe8166fc9 ('device: only deactivate when the master we've
enslaved to goes away') added the "return", but it seems to also add it
in cases where we need to handle this. Restrict the return to cases if
we do "no-config".

https://bugzilla.redhat.com/show_bug.cgi?id=2130287

Fixes: 1fe8166fc9 ('device: only deactivate when the master we've enslaved to goes away')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1406
(cherry picked from commit 2be9c693d9)
2022-10-11 18:10:35 +02:00
Thomas Haller
afe53b902f
doc: fix bind-activation description for AddAndActivateConnection2 D-Bus API
Fixes: eb883e34a5 ('core: Add option to AddAndActivateConnection2 to bind the lifetime')
(cherry picked from commit 88f5e7518a)
2022-10-05 10:48:25 +02:00
Thomas Haller
ecc671d88f
build: merge branch 'th/build-gettext-update-po'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1405

(cherry picked from commit 5713a533f5)
2022-10-03 17:53:37 +02:00
Thomas Haller
c34d3a7c10
build: don't "update-po" during make dist
Instead, hack gettext's Makefile.

gettext has an issue with parallel make. See [1] and [2].
Reproduce with:

  git reset --hard &&
    git clean -fdx &&
    NOCONFIGURE=yes ./autogen.sh &&
    ./configure --enable-gtk-doc --enable-introspection &&
    make -j distcheck V=1

We worked around this by setting "DIST_DEPENDS_ON_UPDATE_PO = yes",
however that (obviously) results in regenerating source files during
dist. "Source files" in the sense that the po files are commited to git
and get distributed in the release. Doing this is very ugly.

In particular it's ugly, because `make -C po update-po` is not reproducible
and the output depends on the current time (*had one job*).
Otherwise, we could just regenerate the files before doing a release.

This means, running "release.sh" script ends up with a dirty tree
afterwards. Also, the distributed po files are not the ones from the source
tree when we did the release. Also, since "release.sh rc1" does two distributions
(once for the rc1 and once for the next devel snapshot), the commit for the
second distribution will have a large diff for the po files.

This reverts commit 978d8eb699 ('po: make dist depend on update-po')
and hacks around the problem.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1094#note_1435313
[2] https://lists.gnu.org/archive/html/bug-gettext/2022-06/msg00022.html

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1405
(cherry picked from commit 7ee0da3eaf)
2022-10-03 17:53:36 +02:00
Thomas Haller
b03b01adfb
gitlab: fail if "run-test.sh" with dirty working tree
(cherry picked from commit 991481a568)
2022-10-03 17:53:36 +02:00
Thomas Haller
278d32c7e7
core: merge branch 'th/mlag-bonding-slb' (part 2)
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1385

(cherry picked from commit c5beec90a8)
2022-09-29 15:15:41 +02:00
Thomas Haller
56a503c879
firewall: introduce helper function for add/flush/delete nft table command
(cherry picked from commit e796a67d6c)
2022-09-29 15:15:40 +02:00
Thomas Haller
d7bc25b3bd
firewall: fail from nm_firewall_nft_call() on non-zero exit code
(cherry picked from commit 02feefb1df)
2022-09-29 15:15:40 +02:00
Thomas Haller
6af0233a21
device: allow resetting the devip state via nm_device_devip_set_state()
There is no reason to disallow resetting the state.

(cherry picked from commit 607a9544cb)
2022-09-29 15:15:39 +02:00
Thomas Haller
f4126a12cd
glib-aux: add NM_UTILS_ERROR_COMMAND_FAILED error code
(cherry picked from commit a5f125f8cb)
2022-09-29 15:15:39 +02:00
Thomas Haller
431c219ad1
glib-aux: add nm_utils_get_process_exit_status_desc_buf() helper
(cherry picked from commit 95e6ebec66)
2022-09-29 15:15:39 +02:00
Thomas Haller
3548033fad
bond: merge branch 'th/bond-opt-cleanup'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1380

(cherry picked from commit 8a0aa2c8ac)
2022-09-29 14:14:43 +02:00
Thomas Haller
46e3c23d85
bond: use _nm_setting_bond_opt_value_as_intbool() in _platform_lnk_bond_init_from_setting()
Previously, we used _nm_utils_ascii_str_to_bool(). That can accept any
kind of input (like "true"), so one might think that this is better to
use on user-input. However, NMSettingBond already validates the these
options are integers (either "0" or "1"). So a value like "true"
could never be here.

Use _nm_setting_bond_opt_value_as_intbool() because that asserts that
the option if of the expected type (integer).

(cherry picked from commit b1a72d0f21)
2022-09-29 14:14:42 +02:00