Commit graph

24734 commits

Author SHA1 Message Date
Thomas Haller
beeb067c71 dhcp/nettools: first clear source before emitting event in dhcp4_event_cb()
A similar patch was done on master, but here the situation is different.

I feel we should not allow for the possibility where we invoke an event
that might mess with the source id. In practice there was no problem.
But it feels cleaner to clear it first.

Fixes: 843d696e46 ('dhcp: clean source on dispatch failure')
(cherry picked from commit 0549351111)
2020-03-04 16:13:05 +01:00
Beniamino Galvani
7a004ef0bb dhcp: clean source on dispatch failure
Fix the following warning:

 NetworkManager[1524461]: Source ID 3844 was not found when attempting to remove it

 g_logv (log_domain=0x7f2816fa676e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffe697374d0) at gmessages.c:1391
 g_log (log_domain=log_domain@entry=0x7f2816fa676e "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f2816fae240 "Source ID %u was not found when attempting to remove it") at gmessages.c:1432
 g_source_remove (tag=519) at gmain.c:2352
 nm_clear_g_source (id=<optimized out>) at ./shared/nm-glib-aux/nm-macros-internal.h:1198
 dispose (object=0x55f7289b1ca0) at src/dhcp/nm-dhcp-nettools.c:1433
 g_object_unref (_object=<optimized out>) at gobject.c:3303
 g_object_unref (_object=0x55f7289b1ca0) at gobject.c:3232
 dhcp4_cleanup (self=self@entry=0x55f728af3b20, cleanup_type=cleanup_type@entry=CLEANUP_TYPE_DECONFIGURE, release=release@entry=0) at src/devices/nm-device.c:7565
 ...

Fixes: 45521b1b38 ('dhcp: nettools: move to failed state if event dispatch fails')
(cherry picked from commit 843d696e46)
2020-03-03 09:40:17 +01:00
Beniamino Galvani
08e8afcf17 Revert "dispatcher/systemd: order NetworkManager-dispatcher.service Before=NetworkManager.service"
The 'Before' dependency between NM-dispatcher and NM causes a deadlock
when stopping the NM service. When terminating, NM wants to D-Bus
activate NM-dispatcher to synchronously handle pre-down events; but
NM-dispatcher start is ordered after NM shutdown due to the following
behavior described in systemd.unit(5) man page:

  Given two units with any ordering dependency between them, if one
  unit is shut down and the other is started up, the shutdown is
  ordered before the start-up. It doesn't matter if the ordering
  dependency is After= or Before=, in this case. It also doesn't
  matter which of the two is shut down, as long as one is shut down
  and the other is started up; the shutdown is ordered before the
  start-up in all cases.

So, NM is waiting NM-dispatcher to start and NM-dispatcher is queued
by systemd, waiting that NM is stopped. The result is a 90 seconds
delay, after which systemd kills NM and continues.

The dependency was added so that during shutdown NM-dispatcher would
be stopped after NM. I don't think it worked as expected because
NM-dispatcher is not supposed to be active most of the times, and so
it doesn't need a dependency that delays its stop after NM.

This reverts commit acc335aad4.

(cherry picked from commit 105abf27c1)
2020-03-02 17:49:45 +01:00
Antonio Cardace
2644b0c753 nm-setting-bond: fix '[up|down]delay', 'miimon' validation
Just looking at the hashtable entry of 'updelay' and 'downdelay' options
is wrong, we have to inspect their values to check if they're
actually enabled or not.

Otherwise bond connections with valid settings will fail
when created:

$ nmcli c add type bond ifname bond99 bond.options miimon=0,updelay=0,mode=0
Error: Failed to add 'bond-bond99' connection: bond.options: 'updelay' option requires 'miimon' option to be set

Also add unit tests.

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

Fixes: d595f7843e ('libnm: add libnm/libnm-core (part 1)')
(cherry picked from commit 50da785be1)
2020-02-28 15:47:37 +01:00
Beniamino Galvani
4045608ca8 ovs: merge branch 'bg/ovs-no-bridge-rh1797696'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/422
https://bugzilla.redhat.com/show_bug.cgi?id=1797696
(cherry picked from commit 47f81864ba)
2020-02-24 15:05:24 +01:00
Beniamino Galvani
7494a2e37a ovs: fail port enslavement when the bridge device is not found
Fail the enslavement of the ovs port if the bridge device is not
found, instead of generating assertions and potentially crash later.

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

Fixes: 101e65d2bb ('ovs: allow changing mac address of bridges and interfaces')
(cherry picked from commit c5c49995b1)
2020-02-24 15:04:58 +01:00
Beniamino Galvani
d8fb95d22b ovs: fail port enslavement when the bridge AC is not found
The previous code tried to get the bridge active connection and it
used the port active connection instead in case of failure. This
doesn't seem right, as in nm-ovsdb.c the bridge AC is used to get the
bridge settings (including the uuid, interface name, and cloned mac).

In case of failure getting the bridge AC we should just fail.

Fixes: 830a5a14cb ('device: add support for OpenVSwitch devices')
(cherry picked from commit c8b5a3f91a)
2020-02-24 15:04:55 +01:00
Beniamino Galvani
932b4538ae n-dhcp4: keep trying after a failure in send()
Currently if an error is encountered during a send() of a message, the
client fails and there is no possibility of recover, since no timers
are armed after a failed event dispatch. An easy way to reproduce a
failure is to add a firewall rule like:

  iptables -A OUTPUT -p udp --dport 67 -j REJECT

which makes the send() fail with EPERM during the renew. In such case,
the client should continue (failing) until it reaches the rebind phase
at T2, when it will be able to renew the lease using the packet
socket.

In general, a failure to send a packet should not cause the failure of
the client.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/419
https://bugzilla.redhat.com/show_bug.cgi?id=1806516
(cherry picked from commit 5a7b83ea0a)
2020-02-24 15:04:41 +01:00
Beniamino Galvani
84c4920f5d n-dhcp4: fix logging macro
The level can be a complex expression, don't use it directly in the
macro.

(cherry picked from commit 910267cf5f)
2020-02-24 15:04:40 +01:00
Thomas Haller
5abb14611b gitlab-ci: fix deploying documentation after switching to Fedora 31
Fixes: ec8068ec0c ('gitlab-ci: add "t_fedora:32" and by default build on Fedora 31')
(cherry picked from commit f12b830a94)
2020-02-22 13:58:39 +01:00
Antonio Cardace
ffbc8fe2a8 nm-logging: fix stack-use-after-scope error detected by asan
asan error:

==6291==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffe6af12880 at pc 0x7fc8dd3321cd bp 0x7ffe6af11be0 sp 0x7ffe6af11388
READ of size 15 at 0x7ffe6af12880 thread T0
    #0 0x7fc8dd3321cc  (/lib64/libasan.so.5+0x4e1cc)
    #1 0x7fc8dcebcf29 in sd_journal_sendv ../src/journal/journal-send.c:226
    #2 0x74d834 in _nm_log_impl ../src/nm-logging.c:778
    #3 0x42485c in main ../src/main.c:379
    #4 0x7fc8dca1b1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
    #5 0x427e3d in _start (/work/NetworkManager/build/src/NetworkManager+0x427e3d)

Address 0x7ffe6af12880 is located in stack of thread T0 at offset 736 in frame
    #0 0x74c26f in _nm_log_impl ../src/nm-logging.c:663

  This frame has 9 object(s):
    [48, 56) 's_log_domains' (line 744)
    [80, 88) 'l_log_domains' (line 745)
    [112, 128) 'tv' (line 666)
    [144, 168) 'args' (line 664)
    [208, 240) 'g_copy' (line 670)
    [272, 312) 'cur_log_state_copy' (line 669)
    [352, 392) 'iov_free_data' (line 730)
    [432, 672) 'iov_data' (line 728)
    [736, 1024) 's_log_domains_buf' (line 743) <== Memory access at offset 736 is inside this variable

(cherry picked from commit 904050dd2d)
2020-02-22 12:22:51 +01:00
Thomas Haller
6f189da7b6 platform: avoid compiler warning in _NMP_OBJECT_TYPE_IS_OBJ_WITH_IFINDEX()
Surisingly, the compiler may detect the remaining obj_type in
the default switch. Then, inlining nmp_class_from_type() it may detect
that this is only possible to hit with an out or range access to
_nmp_classes array.

Rework the code to avoid that compiler warning. It's either way not
supposed to happen.

Also, drop the default switch case and explicitly list the enum values.
Otherwise it is error prone to forget a switch case.

(cherry picked from commit 9848589fbf)
2020-02-22 12:10:57 +01:00
Thomas Haller
139586c95c all: merge branch 'th/fix-gitlab-ci-failures'
(cherry picked from commit cb2c00d823)
2020-02-22 10:55:25 +01:00
Thomas Haller
c8f372b3a6 libnm-core/tests: avoid -Wstring-compare in unit test for NM_IN_SET()
Clang 10 doesn't like NM_IN_SET() with strings and is right about that:

    ../libnm-core/tests/test-general.c:7763:9: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare]
            (void) NM_IN_SET ("a",  "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

However, NM_IN_STRSET() should work.

(cherry picked from commit c437d6c60a)
2020-02-22 10:50:07 +01:00
Thomas Haller
6e23a1b95d build: disable -Wimplicit-fallthrough warning with clang
Seems clang 10 got support for -Wimplicit-fallthrough, but does
not honor the code comments to suppress the warning. What a
disaster.

Try to detect it.

See-also: https://github.com/ClangBuiltLinux/linux/issues/   #636
See-also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e2079e93f562c7f7a030eb7642017ee5eabaaa10
(cherry picked from commit 86dfc4b099)
2020-02-22 10:50:07 +01:00
Thomas Haller
01fda25250 all: unify spelling of "fall-through" comment for switch statements
We used "/* fall through */" and "/* fall-through */" inconsistently.
Rename to use only one variant.

(cherry picked from commit ffa098edae)
2020-02-22 10:50:07 +01:00
Thomas Haller
f1a4961def gitlab-ci: add "t_fedora:32" and by default build on Fedora 31
(cherry picked from commit ec8068ec0c)
2020-02-22 10:50:02 +01:00
Thomas Haller
a9372112b9 tests: ignore valgrind warnings for unhandled syscalls in libnm,service-provider tests
Otherwise, we get test failures with valgrind on fedora:rawhide
(valgrind-3.15.0-18.fc33.x86_64.rpm, gcc-10.0.1-0.8.fc33.x86_64,
glib2-devel-2.63.5-3.fc33.x86_64):

    >>>> PRINT VALGRIND LOGS (valgrind test) (start)
    + find -name '*.valgrind-log' -print0
    + xargs -0 grep -H '^'
    ./src/devices/wwan/tests/test-service-providers.valgrind-log:--95634-- WARNING: unhandled amd64-linux syscall: 315
    ./src/devices/wwan/tests/test-service-providers.valgrind-log:--95634-- You may be able to write your own handler.
    ./src/devices/wwan/tests/test-service-providers.valgrind-log:--95634-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
    ./src/devices/wwan/tests/test-service-providers.valgrind-log:--95634-- Nevertheless we consider this a bug.  Please report
    ./src/devices/wwan/tests/test-service-providers.valgrind-log:--95634-- it at http://valgrind.org/support/bug_reports.html.
    ./libnm/tests/test-remote-settings-client.valgrind-log:--95245-- WARNING: unhandled amd64-linux syscall: 315
    ./libnm/tests/test-remote-settings-client.valgrind-log:--95245-- You may be able to write your own handler.
    ./libnm/tests/test-remote-settings-client.valgrind-log:--95245-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
    ./libnm/tests/test-remote-settings-client.valgrind-log:--95245-- Nevertheless we consider this a bug.  Please report
    ./libnm/tests/test-remote-settings-client.valgrind-log:--95245-- it at http://valgrind.org/support/bug_reports.html.
    ./libnm/tests/test-secret-agent.valgrind-log:--95280-- WARNING: unhandled amd64-linux syscall: 315
    ./libnm/tests/test-secret-agent.valgrind-log:--95280-- You may be able to write your own handler.
    ./libnm/tests/test-secret-agent.valgrind-log:--95280-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
    ./libnm/tests/test-secret-agent.valgrind-log:--95280-- Nevertheless we consider this a bug.  Please report
    ./libnm/tests/test-secret-agent.valgrind-log:--95280-- it at http://valgrind.org/support/bug_reports.html.
    ./libnm/tests/test-nm-client.valgrind-log:--95208-- WARNING: unhandled amd64-linux syscall: 315
    ./libnm/tests/test-nm-client.valgrind-log:--95208-- You may be able to write your own handler.
    ./libnm/tests/test-nm-client.valgrind-log:--95208-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
    ./libnm/tests/test-nm-client.valgrind-log:--95208-- Nevertheless we consider this a bug.  Please report
    ./libnm/tests/test-nm-client.valgrind-log:--95208-- it at http://valgrind.org/support/bug_reports.html.
    + echo '>>>> PRINT VALGRIND LOGS (valgrind test) (done)'
    >>>> PRINT VALGRIND LOGS (valgrind test) (done)

(cherry picked from commit 3e616c306d)
2020-02-22 10:50:02 +01:00
Antonio Cardace
ef786159c4 meson: add additional debug CFLAGS to use the same ones autotools uses
(cherry picked from commit 6dc8167588)
2020-02-22 10:45:36 +01:00
Thomas Haller
96f50cf9d8 build/autotools: fix passing AM_CFLAGS when building libnm-core
With `./configure --enable-more-asserts`, we add extra -W flags to
AM_CFLAGS. This variable is only used, if the per-library override
libnm_core_libnm_core_la_CFLAGS is unspecified ([1]).

Usually we avoid this problem be never specifying library_CFLAGS, but
placing all our per-library flags to library_CPPFLAGS. While that is a
bit of a hack and misuse of CPPFLAGS, it works well (enough).

This was broken recently. The effect was, that libnm-core was not
build with AM_CFLAGS flags. Fix it.

[1] https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html

Fixes: d2d6a68697 ('build: use -fcommon when building libnm-core')
(cherry picked from commit 16df1c179d)
2020-02-21 10:12:24 +01:00
Thomas Haller
263e12c9d6 bond: merge branch 'th/bond-allow-arp-validate' (partial backport)
https://bugzilla.redhat.com/show_bug.cgi?id=1789437

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/418

(cherry picked from commit 1fbfbf743d)
2020-02-19 17:31:01 +01:00
Thomas Haller
02ba767496 device: allow setting "arp_validate" with supported bond modes
arp_validate is allowed for several bonding modes, at least since commit [1].

The validation was too strict. Just use set_bond_attr() directly, that
already correctly encodes whether to set the value or not.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=13ac34a8866e31b31db6237c73aa558aff84d765

(cherry picked from commit d9d51dd42d)
2020-02-19 17:30:15 +01:00
Beniamino Galvani
987c1d282a Revert "core: create virtual device on settings changes in idle handler"
When AddConnection() or Update() terminate, the (unrealized) virtual
device should be already be available, otherwise an activation attempt
of that connection can fail.

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

This reverts commit c163207b07.

(cherry picked from commit efc04b1285)
2020-02-19 10:06:21 +01:00
Thomas Haller
0c8046574e ifcfg: fix writer when changing OVS slave to clear previous settings
We need to reset the OVS_PORT and OVS_PORT_UUID variables.
Otherwise, clearing the slave type doesn't work.

On master this is solved differently, by automatically clearing all
variables that are not explicitly set.

Reproducer:

    nmcli con del t-eth1
    nmcli con add type ethernet autoconnect no ifname eth1 master port0 con-name t-eth1 slave-type ovs-port
    echo "
    remove ovs-interface
    remove connection.master
    remove connection.slave-type
    print
    save
    quit
    " | nmcli c edit t-eth1
    nmcli con show t-eth1 | grep 'ovs\|slave-type'

Fixes: 1440fe6a88 ('ifcfg: don't forget master of ovs interfaces')

https://bugzilla.redhat.com/show_bug.cgi?id=1804167
2020-02-18 18:37:45 +01:00
Antonio Cardace
6e12b31d1f release: bump version to 1.22.9 (development) 2020-02-18 16:49:55 +01:00
Antonio Cardace
fa6c656473 release: bump version to 1.22.8 2020-02-18 16:48:01 +01:00
Antonio Cardace
24977b55c8 release: update NEWS 2020-02-18 16:46:35 +01:00
Thomas Haller
82237a3344 shared/trivial: add code comment to nm_utils_ifname_valid_kernel()
(cherry picked from commit eb74d5f65f)
2020-02-18 13:28:49 +01:00
Thomas Haller
9bbb021b4f shared: check for valid UTF-8 in nm_utils_ifname_valid()
The interface name might come from the command line or from a filename
(like during nm_vpn_wireguard_import()). It's not clear that this
is valid UTF-8. Asserting against that requires the caller to ensure
that the encoding is valid. That is cumbersome, especially since we anyway
check. Just report a regular error.

(cherry picked from commit 82fb8b00b4)
2020-02-18 13:28:48 +01:00
Antonio Cardace
88d0d80d09 nm-shared-utils: relax ovs ifname check to accept any (non-space) ASCII printable char
quoting 'man ovs-vswitchd.conf.db':
"The name must be alphanumeric and must not contain forward or backward
slashes."

OVS actually accepts a wider range of chars (all printable UTF-8 chars),
NetworkManager restricts this to ASCII char as it's a safer option for
now since OVS is not well documented on this matter.

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

Fixes: e7d72a14f6 ('libnm-core: use different ifname validation function for OVS bridges, ports and interfaces')
(cherry picked from commit ed5a647ad1)
2020-02-18 13:12:59 +01:00
Beniamino Galvani
53b878818c ovs: merge branch 'bg/ovs-deactivate-async-pt2'
https://bugzilla.redhat.com/show_bug.cgi?id=1787989
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/412
(cherry picked from commit e24fd88494)
2020-02-17 19:08:48 +01:00
Beniamino Galvani
c4eb0c6852 ovs: discard link updates when deactivating
When the ovs interface gets deactivated, it is released from the
master port and we call nm_device_update_from_platform_link (dev,
NULL) to ignore any later event for the interface. This is important
especially because it sets a zero ifindex on the interface and so,
later when the link disappears, we don't unmanage the device but
directly remove it.

However, since ovs commands are queued, the link could appear during
the deactivation and we need to ignore such events. Add a new device
method can_update_from_platform_link() for such purpose.

(cherry picked from commit e9fc1dea43)
2020-02-17 19:08:21 +01:00
Beniamino Galvani
2e5e409bf2 ovs: rework asynchronous deactivation of ovs interfaces
Tracking the deletion of link by ifindex is difficult because the
ifindex of the device is updated through delayed (idle) calls in
NMDevice and so there is the possibility that at a certain time the
device ifindex is not in sync with platform state. It seems simpler to
watch instead the interface name. The ugly thing is that the interface
name can be changed externally, but if users do that on an activating
device they are looking for trouble.

Also change the deactivate code to deal with the scenario where we
already created the interface in the ovsdb but the link didn't show up
yet. To ensure a proper cleanup we must wait that the link appears and
then goes away; however the link may never appear if vswitchd sees
only the last state in ovsdb, and so we must use a ugly timeout to
avoid waiting forever.

https://bugzilla.redhat.com/show_bug.cgi?id=1787989
(cherry picked from commit 9c49f8a879)
2020-02-17 19:08:20 +01:00
Beniamino Galvani
644151b07a n-dhcp4: request previous address after expiration
If the lease expires and the client start again sending a discover,
request the previous address.

(cherry picked from commit 3286918bd9)
2020-02-17 19:07:36 +01:00
Thomas Haller
b1dcfcb7b7 shared: fix returning out_len from nm_utils_hash_values_to_array()
The only affected caller is nm_modem_manager_get_modems(), which
is used by NMDeviceBt for DUN connections. This is rather bad.

Fixes: 4154d9618c ('bluetooth: refactor BlueZ handling and let NMBluezManager cache ObjectManager data')
Fixes: e688e70b37 ('shared: add nm_utils_hash_values_to_array() helper')
(cherry picked from commit 037507f790)
2020-02-17 17:55:52 +01:00
Antonio Cardace
4200d0a85b Merge branch 'ac/ovs_ifname_length' into 'master'
[ac/ovs ifname length]

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/408

(cherry picked from commit 63eabe0dbf)
2020-02-17 17:34:49 +01:00
Antonio Cardace
a44fa6c689 libnm-core: use different ifname validation function for OVS bridges, ports and interfaces
OVS bridges and ports do not have the length limitation of 15 bytes, the
only requirements are that all chars must be alphanumeric and not be
forward or backward slashes.

For OVS interfaces only 'patch' types do not have the length limit, all
the other types do (according to whether they have a corresponding
kernel link or not).

Add related unit test.

https://bugzilla.redhat.com/show_bug.cgi?id=1788432
(cherry picked from commit e7d72a14f6)
2020-02-17 17:31:31 +01:00
Antonio Cardace
1a4b59a7c3 nm-setting-ovs-interface: remove unneeded check on 'self'
'self' is guaranteed of being not-NULL since we have the
assertion 'g_return_val_if_fail (NM_IS_SETTING_OVS_INTERFACE (self),FALSE);'
at the beginning of the function.

(cherry picked from commit 15e87b80f3)
2020-02-17 17:28:15 +01:00
Antonio Cardace
30d329567c libnm-core: add assertion for valid 'error' argument in nm_utils_is_valid_iface_name()
(cherry picked from commit 72f7ad75dc)
2020-02-17 17:28:15 +01:00
Antonio Cardace
c3b0f1d4f5 all: use nm_utils_ifname_valid_kernel() instead of nm_utils_is_valid_iface_name()
nm_utils_is_valid_iface_name() is a public API of libnm-core, let's use
our internal API.

$ sed -i 's/\<nm_utils_is_valid_iface_name\>/nm_utils_ifname_valid_kernel/g' $(git grep -l nm_utils_is_valid_iface_name)

(cherry picked from commit 6e9a36ab9f)
2020-02-17 17:28:14 +01:00
Antonio Cardace
2cf568bd8f nm-shared-utils: add nm_utils_ifname_valid*() to shared utils
Move the body of nm_utils_is_valid_iface_name() to
nm_utils_ifname_valid_kernel() so that it's shared between NM and
clients.

(cherry picked from commit 550f538564)
2020-02-17 17:26:47 +01:00
Antonio Cardace
5fb293cfc6 nmcli: remove interface length check in nmcli
nmcli should not perform checks on the interface name length,
this kind of operations should only be performed by the NetworkManager
daemon and not be duplicated inside cli applications.

(cherry picked from commit 15a8595575)
2020-02-17 17:25:52 +01:00
Antonio Cardace
816aacc4c2 nm-device-factory: remove ifname check as it prevents activating OVS connections
(cherry picked from commit 0cac094c93)
2020-02-17 17:25:52 +01:00
Antonio Cardace
e52fccb0d0 nm-dhcp-client: use nm_assert() to check ifname
so that it gets compiled out in production builds, this check is
carried out anyway when the connection is created.

(cherry picked from commit 9e27252c27)
2020-02-17 17:25:52 +01:00
Thomas Haller
91b2be2e1b all: merge branch 'th/ra-timeout'
https://bugzilla.redhat.com/show_bug.cgi?id=1801158

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/414

(cherry picked from commit 4c993f6bbb)
2020-02-17 15:12:30 +01:00
Thomas Haller
8d04ae1e84 version: add NM_VERSION_1_22_8/NM_AVAILABLE_IN_1_22_8 macros 2020-02-17 15:06:10 +01:00
Thomas Haller
f259b4b6c0 ndisc: implement "ipv6.ra-timeout" property
(cherry picked from commit 9dde86d02c)
2020-02-17 15:06:10 +01:00
Thomas Haller
1f4c8a0f54 ndisc: rename NM_NDISC_RA_TIMEOUT signal to NM_NDISC_RA_TIMEOUT_SIGNAL
We will add a property NM_NDISC_RA_TIMEOUT for which this name is better
suited. The problem is really that our convention for object properties
and signals defines have no prefix to indicate whether it's a property
or a signal.

Rename.

(cherry picked from commit 10f0253f2e)
2020-02-17 15:06:10 +01:00
Thomas Haller
7c86bc9c97 ndisc: improve logging message with nm_ndisc_start() and minor cleanup
(cherry picked from commit b2e30b3c9a)
2020-02-17 15:06:10 +01:00
Thomas Haller
c1b640da2d libnm,cli,ifcfg-rh: add ipv6.ra-timeout configuration option
(cherry picked from commit de4aeb34e3)
2020-02-17 15:06:10 +01:00