Commit graph

24806 commits

Author SHA1 Message Date
Thomas Haller
52bb253f6b
libnm,ifcfg-rh: fix documentation for IEEE_8021X_PASSWORD_RAW_FLAGS in man nm-settings-ifcfg-rh
Fixes: a83ab252ee ('ifcfg-rh: add support for 802-1x.password-raw property')
(cherry picked from commit 9fde21504e)
(cherry picked from commit 36ddd266a5)
2020-05-29 13:11:36 +02:00
Thomas Haller
6066e16367
libnm,ifcfg-rh: merge branch 'th/ifcfg-rh-ca-path'
https://bugzilla.redhat.com/show_bug.cgi?id=1840210
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/448

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

(cherry picked from commit e0c220e7e9)
(cherry picked from commit 8affcc19b6)
2020-05-27 11:06:32 +02:00
Thomas Haller
1a989a98bf
libnm: update documentation for 802-1x ca-cert, ca-path and system-ca-certs
(cherry picked from commit 4f21b14b90)
(cherry picked from commit 0d35d14faf)
2020-05-27 10:57:39 +02:00
Thomas Haller
7a20dd4dbb
ifcfg-rh: fix handling "802-1x.{phase2-,}ca-path" in ifcfg-rh settings plugin
https://bugzilla.redhat.com/show_bug.cgi?id=1840210
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/448
(cherry picked from commit b6b6639c7c)
(cherry picked from commit 67f1da27fe)
2020-05-27 10:57:29 +02:00
Thomas Haller
eb9767a6c8
build: log system-ca-path configure setting in build scripts
(cherry picked from commit f8dcb3fc47)
(cherry picked from commit f3f179728e)
2020-05-27 10:56:36 +02:00
Thomas Haller
e9f2831ab5
keyfile: suppress bogus warning about [ethernet-s390-options] setting
S390 options are stored in a separate [ethernet-s390-options] section.
This group must not be interpreted as a NMSetting name, otherwise we
log a bogus warning:

  <warn>  [1590523563.7757] keyfile: ethernet-s390-options: invalid setting name 'ethernet-s390-options'

Fixes: cf9b8d3bad ('libnm/keyfile: implement ethernet.s390-options in keyfile')
(cherry picked from commit 82a468c9ad)
(cherry picked from commit d611647997)
2020-05-27 09:45:23 +02:00
Beniamino Galvani
321311ff7d release: bump version to 1.22.13 (development) 2020-05-21 14:26:24 +02:00
Beniamino Galvani
c3de72e0ca release: bump version to 1.22.12 2020-05-21 14:26:24 +02:00
Beniamino Galvani
cd7aacd106 release: update NEWS 2020-05-21 14:26:24 +02:00
Beniamino Galvani
678c6b6a6a core: signal parent-active only when the parent AC is activated
The parent-active signal is used by the manager to determine when the
parent active-connection is ready and a connection that depend on it
can proceed.

The AC state could transition from ACTIVATING directly to
DEACTIVATING; in such case we should not emit the signal but instead
just stop watching the parent AC.

Fixes: 6e382ea91d ('active-connection: add parent active connection tracking')
https://bugzilla.redhat.com/show_bug.cgi?id=1778073
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/510
(cherry picked from commit 02ea74c920)
(cherry picked from commit 30be025e59)
2020-05-19 21:43:42 +02:00
Beniamino Galvani
efdc70f78d core: merge branch 'bg/shared-mode-firewall-rh1829637'
https://bugzilla.redhat.com/show_bug.cgi?id=1829637
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/498
(cherry picked from commit 779e5c0efb)
(cherry picked from commit 76510c8a61)
2020-05-19 08:44:49 +02:00
Beniamino Galvani
95a3ea21b9 contrib/rpm: enable the firewalld zone in F32 and RHEL8
(cherry picked from commit 016a82e6dd)
(cherry picked from commit e7b4644d0a)
2020-05-19 08:42:55 +02:00
Beniamino Galvani
1dcdd1e8dd device: use the nm-shared firewalld zone in shared mode
When the interface is in IPv4 or IPv6 shared mode and the user didn't
specify an explicit zone, use the nm-shared one.

Note that masquerade is still done through iptables direct calls
because at the moment it is not possible for a firewalld zone to do
masquerade based on the input interface.

The firewalld zone is needed on systems where firewalld is using the
nftables backend and the 'iptables' binary uses the iptables API
(instead of the nftables one). On such systems, even if the traffic is
allowed in iptables by our direct rules, it can still be dropped in
nftables by firewalld.

(cherry picked from commit 3e2b723532)
(cherry picked from commit 13438e041a)
2020-05-19 08:42:42 +02:00
Beniamino Galvani
5baaf9c871 build: install a firewalld zone for shared mode
Install a NM-specific firewalld zone to be used for interfaces that
are used for connection sharing. The zone blocks all traffic to the
local machine except some protocols (DHCP, DNS and ICMP) and allows
all forwarded traffic.

(cherry picked from commit c8b5bf402d)
(cherry picked from commit ae5f16bb38)
2020-05-19 08:41:02 +02:00
Beniamino Galvani
bef2f8a4dd ip-tunnel: merge branch 'bg/ip-tunnel-cloned-mac-rh1832170'
https://bugzilla.redhat.com/show_bug.cgi?id=1832170
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/503
(cherry picked from commit 2d8c87e22e)
(cherry picked from commit f50ed7a25e)
2020-05-15 10:07:37 +02:00
Beniamino Galvani
d69d92c658 ip-tunnel: set cloned-mac-address only for layer2 tunnel devices
For ip-tunnel modes that encapsulate layer2 packets (gretap and
ip6gretap) we allow the presence of an ethernet setting in the
connection and honor the cloned-mac-address specified in it.

For all other modes, the ethernet setting is removed during
normalization, but a value different from 'preserve' could be set via
global default.

The kernel doesn't allow setting a MAC for layer3 devices, don't do
it.

(cherry picked from commit 0494a84878)
(cherry picked from commit 78ed14166c)
2020-05-15 10:04:04 +02:00
Beniamino Galvani
d0f275e7f5 libnm-core: add _nm_ip_tunnel_mode_is_layer2()
(cherry picked from commit 48c93b3bba)
(cherry picked from commit 5d2f2a6549)
2020-05-15 10:03:20 +02:00
Beniamino Galvani
100ed67a27 cli: unref main loop after destroying NMClient instance
Callbacks might reference the main loop when destroying the NMClient
instance. Unref the main loop later.

  # G_DEBUG=fatal-warnings valgrind --num-callers=100 nmcli device wifi connect home
  ^C
  Error: nmcli terminated by signal Interrupt (2)
  Error: Connection activation failed: (0) No reason given.
  ==11050== Invalid read of size 4
  ==11050==    at 0x4C90D3D: g_main_loop_quit (in /usr/lib64/libglib-2.0.so.0.6200.6)
  ==11050==    by 0x431435: quit (devices.c:934)
  ==11050==    by 0x43272C: connected_state_cb (devices.c:1919)
  ==11050==    by 0x4BF6741: g_closure_invoke (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x4C0A603: ??? (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x4C133AD: g_signal_emit_valist (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x4C139D2: g_signal_emit (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x4BFB1C3: ??? (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x4BFAAEC: ??? (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x4BFD86A: g_object_thaw_notify (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x48BA040: _nm_client_notify_event_emit (nm-client.c:937)
  ==11050==    by 0x48CA01F: _dbus_handle_changes_commit (nm-client.c:2850)
  ==11050==    by 0x48CC221: _dbus_handle_changes (nm-client.c:2864)
  ==11050==    by 0x48CC833: _init_release_all (nm-client.c:6969)
  ==11050==    by 0x48D2818: dispose (nm-client.c:7826)
  ==11050==    by 0x4BFBC27: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.6200.6)
  ==11050==    by 0x43FF93: nmc_cleanup (nmcli.c:941)
  ==11050==    by 0x4410AD: main (nmcli.c:1005)
  ==11050==  Address 0x54738fc is 12 bytes inside a block of size 16 free'd
  ==11050==    at 0x4839A0C: free (vg_replace_malloc.c:540)
  ==11050==    by 0x4C9649C: g_free (in /usr/lib64/libglib-2.0.so.0.6200.6)
  ==11050==    by 0x4410A3: main (nmcli.c:1004)
  ==11050==  Block was alloc'd at
  ==11050==    at 0x483AB1A: calloc (vg_replace_malloc.c:762)
  ==11050==    by 0x4C96400: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.6200.6)
  ==11050==    by 0x4C90A45: g_main_loop_new (in /usr/lib64/libglib-2.0.so.0.6200.6)
  ==11050==    by 0x441020: main (nmcli.c:987)

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/501
(cherry picked from commit 211c6fa795)
(cherry picked from commit f8452b48e9)
2020-05-12 23:05:46 +02:00
Thomas Haller
c0997fa4f3
acd: fix char buffer argument to _acd_event_to_string_buf()
(cherry picked from commit 6e9967939b)
(cherry picked from commit 1e1ae9ba07)
2020-05-08 07:58:36 +02:00
Thomas Haller
198e233b91
acd: avoid alloca() inside an unbounded loop
(cherry picked from commit b447c80ad8)
(cherry picked from commit ecb9e0e3df)
2020-05-07 14:06:09 +02:00
Thomas Haller
b5a66b88b3
libnm: fix gtk-doc annotations for nm_setting_match_get_interface_names()
Otherwise the function is not usable via generated bindings.

Fixes: 9b9dce9486 ('all: add 'match' setting')
(cherry picked from commit 180cda7632)
(cherry picked from commit 805adec9ca)
2020-05-06 15:11:23 +02:00
Beniamino Galvani
cd056b664b platform: fix test failure when /proc is mounted read-only
Expect a failure when writing to /proc if the file system is mounted
read-only.

(cherry picked from commit 211eb3ff8a)
2020-05-04 14:00:27 +02:00
Beniamino Galvani
f2fdb6710f n-dhcp4: don't fail dispatch in case of receive errors
Currently any error encountered in n_dhcp4_c_connection_dispatch_io()
causes a dispatch failure and interrupts the library state
machine. The recvmsg() on the socket can fail for different reasons;
one of these is for example that the UDP request previously sent got a
ICMP port-unreachable response. This can be reproduced in the
following way:

 ip netns add ns1
 ip link add veth0 type veth peer name veth1
 ip link set veth1 netns ns1
 ip link set veth0 up

 cat > dhcpd.conf <<EOF
 server-identifier 172.25.0.1;
 max-lease-time 120;
 default-lease-time 120;
 subnet 172.25.0.0 netmask 255.255.255.0 {
        range 172.25.0.100 172.25.0.200;
 }
 EOF

 ip -n ns1 link set veth1 up
 ip -n ns1 address add dev veth1 172.25.0.1/24
 ip netns exec ns1 iptables -A INPUT -p udp --dport 67 -j REJECT
 ip netns exec ns1 dhcpd -4 -cf dhcpd.conf -pf /tmp/dhcp-server.pid

If a client is started on veth0, it is able to obtain a lease despite
the firewall rule blocking DHCP, because dhcpd uses a packet
socket. Then it fails during the renewal because the recvmsg() fails:

 dhcp4 (veth0): send REQUEST of 172.25.0.178 to 172.25.0.1
 dhcp4 (veth0): error -111 dispatching events
 dhcp4 (veth0): state changed bound -> fail

The client should consider such errors non fatal and keep running.

https://bugzilla.redhat.com/show_bug.cgi?id=1829178
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/486
(cherry picked from commit c5d1d4c498)
(cherry picked from commit bee01292f8)
2020-04-30 18:18:09 +02:00
Beniamino Galvani
93df9d6c49 device: flush IP configuration of slaves during activation
If a device only has an IPv6 link-local address, we don't generate an
assumed connection. Therefore, when a new slave connection (without IP
configuration) is activated on the device, we don't deactivate any
existing connection and the link-local address remains configured.

The IP configuration of an activated slave should be predictable and
not depend on the previous state; let's flush addresses and routes on
activation.

https://bugzilla.redhat.com/show_bug.cgi?id=1816517
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/480
(cherry picked from commit e302f5ff77)
(cherry picked from commit 0344a97105)
2020-04-28 10:02:58 +02:00
Thomas Haller
55c361453b vpn: clear host part of IPv6 routes received from VPN plugin
Kernel would reject adding a route with a destination host part not
all zero. NetworkManager generally coerces such routes and there
are assertions in place to ensure that.

We forgot to ensure that for certain IPv6 routes from VPN plugins.
This can cause an assertion failure and wrong behavior.

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

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/482
(cherry picked from commit b437bb4a6e)
(cherry picked from commit c7586e6388)
2020-04-28 09:43:04 +02:00
Beniamino Galvani
74c4494b3b man: mention the meaning of may-fail in the nm-online man page
Commit b2a0738765 ('man: improve manual page for nm-online') removed
the explanation of how may-fail can be used to wait for a specific
address family during boot. I found that part useful. Add it again,
adapting it to the new behavior introduced by 1e5206414a ('device:
don't delay startup complete for pending-actions "autoconf", "dhcp4"
and "dhcp6"').

https://bugzilla.redhat.com/show_bug.cgi?id=1825666
(cherry picked from commit 25583de20b)
(cherry picked from commit 02a31e71af)
2020-04-24 15:48:33 +02:00
Thomas Haller
d2606cc49e cli: unset "ipv[46].never-default" when setting "ipv[46].gateway"
Since commit c1907a218a ('libnm-core: remove gateway when
never-default=yes in NMSettingIPConfig'), the gateway gets normalized
away when the profile has never-default set.

That means,

  $ nmcli connection modify "$PROFILE" ipv4.never-default yes ipv4.gateway 192.168.77.1

does not set the gateway. Likewise, if your profile has already never-default
enabled,

  $ nmcli connection modify "$PROFILE" ipv4.gateway 192.168.77.1

will have no effect. That is confusing and undesirable.

Note that we don't adjust the GObject property setter for "gateway" to clear
never-default. I feel, setting one property in libnm should preferably
not unset another (there are exceptions to the rule, like for team
properties). However, for nmcli it's clear in which order properties
are set, so this change is right for the client tool.

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

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/475
(cherry picked from commit 411255d51f)
(cherry picked from commit fae37528d9)
2020-04-22 21:06:44 +02:00
Beniamino Galvani
6abf71f056 bluetooth: disconnect signal on dispose
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/417

Fixes: 4154d9618c ('bluetooth: refactor BlueZ handling and let NMBluezManager cache ObjectManager data')
(cherry picked from commit 5c547fdab3)
(cherry picked from commit 93b130c05a)
2020-04-22 09:24:29 +02:00
Beniamino Galvani
2b7908a1c6 dhcp-helper: retry in case of failure connecting to D-Bus unix socket
Connecting to the unix socket can fail with EAGAIN if there are too
many pending connections and the server can't accept them in time
before reaching backlog capacity. Ideally the server should increase
the backlog length, but GLib doesn't provide a way to change it for a
GDBus server. Retry for up to 5 seconds in case of failure.

https://bugzilla.redhat.com/show_bug.cgi?id=1821594
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/471
(cherry picked from commit eefe5dacaa)
(cherry picked from commit 4cf63dfa15)
2020-04-21 08:58:29 +02:00
Thomas Haller
b10d90a549 tests: abort test runner if exec fails
(cherry picked from commit 2ad8e6acae)
(cherry picked from commit 24ab6b6cdc)
2020-04-20 11:52:38 +02:00
Beniamino Galvani
595f76e243 libnm-core: add 'no-reload' and 'trust-ad' resolv.conf options
https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/res_init.c;h=95dce098aa7ec80f2e36f5c25022641d65e1d5e5;hb=9ea3686266dca3f004ba874745a4087a89682617#l681

https://bugzilla.redhat.com/show_bug.cgi?id=1825285
(cherry picked from commit 40b2cf7a0c)
(cherry picked from commit 5b83609b01)
2020-04-20 11:35:32 +02:00
Thomas Haller
719d492f4a contrib/rpm: fix spec file using bare words
error: bare words are no longer supported, please use "...":  no != "yes"
  error:                                                        ^
  error: /builds/NetworkManager/NetworkManager/contrib/fedora/rpm/NetworkManager.20200418-170120.dp5cp5/SPECS/NetworkManager.spec:596: bad %if condition:  no != "yes"

(cherry picked from commit ed94ab6e23)
(cherry picked from commit 1667be7cf5)
2020-04-19 21:46:01 +02:00
Thomas Haller
5735e267cd contrib/rpm: fix spec file using bare words
error: bare words are no longer supported, please use "...":  no != yes
  error: /builds/NetworkManager/NetworkManager/contrib/fedora/rpm/NetworkManager.20200418-163008.VM582H/SPECS/NetworkManager.spec:596: bad %if condition:  no != yes

(cherry picked from commit be78a12012)
(cherry picked from commit c869d792a2)
2020-04-19 21:45:54 +02:00
Thomas Haller
b9b00a1cb3 gitlab-ci: use old meson version on Ubuntu 16.04 to work with ninja-1.5.1
Meson 0.54.0 requires ninja-1.7 ([1]).

On Ubuntu 16.04, we now would get meson 0.54.0 via pip3, but ninja-1.5.1 via
apt. That doesn't work anymore.

We could install ninja via pip3, but of course, doing that on other
Debian/Ubuntu versions fails due to ... I don't even want to know.

So, instead use an old meson version on Ubuntu 16.04, which is
known to still work with the ninja provided by the packaging system.

We anyway don't want to test the same meson/ninja versions on all our
Ubuntu/Debian images. The point of having different images is to build
with different software versions. If `pip3 install` gives us the same
everywhere, it isn't very useful.

https://mesonbuild.com/Release-notes-for-0-54-0.html#ninja-version-requirement-bumped-to-17
(cherry picked from commit 5feba97cd1)
2020-04-18 17:43:40 +02:00
Thomas Haller
cd33ea1fc0 keyfile: minor cleanup handling error in read_array_of_uint()
Why "if (length > G_MAXUINT)"? This is never going to hit. Also,
we probably should actual missing keys handle differently from
empty lists. If @error is set, return without setting the property.

(cherry picked from commit 2cf31bfef0)
(cherry picked from commit f00d306ae7)
2020-04-15 22:49:21 +02:00
Thomas Haller
59d488cb46 keyfile: avoid assertion failure in nm_keyfile_plugin_kf_get_{string,integer}_list()
g_key_file_get_integer_list() can return %NULL without setting an error.
That is the case if the key is set to an empty value.

For X sake, this API. Read the documentation and figure out whether
the function can return %NULL without reporting an error.

Anyway, avoid the assertion failure.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/412
(cherry picked from commit 8f46425b11)
(cherry picked from commit 97139f5e3d)
2020-04-15 22:49:20 +02:00
Piotr Drąg
5b46bc8572 po: update Polish (pl) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/465
2020-04-14 09:12:07 +02:00
Beniamino Galvani
54254bf6fe ovsdb: retry calls in case of communication error with server
When the server is restarted the write to unix socket fails with
EPIPE. In such case, don't fail all the calls in queue; instead, after
a sync of the ovsdb state (through a monitor call), start processing
the queue again, including the call that previously failed.

Add a retry counter to avoid that calls are stuck in the queue forever
in a hypothetical scenario in which the write always fails.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/459
(cherry picked from commit db37e530e8)
2020-04-09 17:29:17 +02:00
Thomas Haller
045194760e contrib/rpm: avoid bare words in spec file
error: bare words are no longer supported, please use "...":  "x" != x
   error:                                                               ^
   error: /root/nm-build/NetworkManager/contrib/fedora/rpm/NetworkManager.20200402-030113.Hk7EGs/SPECS/NetworkManager.spec:32: bad %if condition:  "x" != x
   ERROR: rpmbuild FAILED

(cherry picked from commit 68b38a09d1)
2020-04-02 09:37:04 +02:00
Thomas Haller
b033ab8449 gitlab-ci: set DEBIAN_FRONTEND=noninteractive for apt-get install
Otherwise, installing a package might prompt for the user to type something,
breaking the CI build.

(cherry picked from commit 571786c211)
2020-04-02 08:25:58 +02:00
Thomas Haller
85811e67dd all: merge branch 'th/strtoll-workaround'
https://bugzilla.redhat.com/show_bug.cgi?id=1797915

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

(cherry picked from commit d342fa267d)
2020-04-02 07:46:00 +02:00
Thomas Haller
eec2740d71 all: use wrappers for g_ascii_strtoll(), g_ascii_strtoull(), g_ascii_strtod()
Sometimes these function may set errno to unexpected values like EAGAIN.
This causes confusion. Avoid that by using our own wrappers that retry
in that case. For example, in rhbz#1797915 we have failures like:

    errno = 0;
    v = g_ascii_strtoll ("10", 0, &end);
    if (errno != 0)
        g_assert_not_reached ();

as g_ascii_strtoll() would return 10, but also set errno to EAGAIN.

Work around that by using wrapper functions that retry. This certainly
should be fixed in glib (or glibc), but the issues are severe enough to
warrant a workaround.

Note that our workarounds are very defensive. We only retry 2 times, if
we get an unexpected errno value. This is in the hope to recover from
a spurious EAGAIN. It won't recover from other errors.

https://bugzilla.redhat.com/show_bug.cgi?id=1797915
(cherry picked from commit 7e49f4a199)
2020-04-02 07:45:39 +02:00
Thomas Haller
95565bef77 shared: add nm_g_ascii_strtoull() to workaround bug
(cherry picked from commit 3b58c5fef4)
2020-04-02 07:45:37 +02:00
Thomas Haller
f8cae1ed18 shared: add nm_g_ascii_strtod() to workaround bug
(cherry picked from commit 35a9f632a8)
2020-04-02 07:45:36 +02:00
Thomas Haller
6836679878 shared: add nm_g_ascii_strtoll() to workaround bug
(cherry picked from commit f4446e34c6)
2020-04-02 07:45:22 +02:00
Thomas Haller
62469c1401 device/bluetooth: avoid g_ascii_strtoull() to parse capabilities
Avoid g_ascii_strtoull() calling directly. It has subtle issues, which is why
we have a wrapper for it.

(cherry picked from commit 659ac9cc12)
2020-04-02 07:44:25 +02:00
Thomas Haller
1a80179c60 ifupdown: use _nm_utils_ascii_str_to_int64() for converting netmask to string
(cherry picked from commit 3930ef194e)
2020-04-02 07:44:25 +02:00
Thomas Haller
c81d12bc69 ifcfg-rh/tests: add unit test for reading DEVTIMEOUT (connection.wait-device-timeout)
(cherry picked from commit 9cbf4c2825)
2020-04-02 07:44:25 +02:00
Thomas Haller
5a44792e41 ifcfg: strip whitespaces around "DEVTIMEOUT"
Be more graceful and allow whitespaces around the floating point number
for DEVTIMEOUT. Note that _nm_utils_ascii_str_to_int64() is already graceful
against whitespace, so also be it with the g_ascii_strtod() code path.

(cherry picked from commit 2e4771be5e)
2020-04-02 07:44:25 +02:00
Thomas Haller
24177569c1 initrd: fix setting VLan ID in reader_parse_vlan()
g_ascii_strtoull() returns a guint64, which is very wrong to directly pass
to the variadic argument list of g_object_set(). We expect a guint there
and need to cast.

While at it, use _nm_utils_ascii_str_to_int64() to parse and validate the input.

(cherry picked from commit d506823d4f)
2020-04-02 07:44:24 +02:00