| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
lgtm.com says "The value assigned to local variable all_connections is never used".
Just drop the entire statement. It's not right there.
|
|
|
|
| |
lgmt.com says "Testing for None should use the is operator".
|
|
|
|
| |
lgtm.com flags this as "Except block directly handles BaseException".
|
|
|
|
| |
Just to silence the warning on lgtm.com.
|
| |
|
|
|
|
| |
lgtm.com warns about this.
|
| |
|
|
|
|
| |
"generate-setting-docs.py"
|
|
|
|
| |
It causes a warning on lgtm.com.
|
|
|
|
|
|
|
|
|
|
|
| |
NMConfigDeviceStateData.nm_owned
lgtm.com warns:
int nm_owned:3;
>> Bit field nm_owned of type int should have explicitly unsigned integral, explicitly signed integral, or enumeration type.
So make it a NMTernary instead. It's nicer anyway.
|
|
|
|
|
|
|
|
|
| |
lgtm.com flags this as "Empty block without comment".
Avoid it.
This code is of course ugly. Much work was already done to
port such occurrences, and more is needed. I won't add a FIXME
comment, because lgtm.com flags those too. :)
|
|
|
|
| |
nmcli_editor_tab_completion()
|
|
|
|
|
|
|
|
| |
Static analysis tools flag the use of localtime() because it is not
thread safe. Of course, that was no problem here, but avoiding the
warning is simple.
Also, if we allocate 128 bytes, let strftime use it.
|
|
|
|
|
|
|
| |
lgtm.com flags this. The check was there to be better safe than sorry.
Also, it seems better to have code that shows what happens instead
of a verbose code comment (or no comment at all). Anyway, avoid the
false positive.
|
| |
|
|
|
|
|
|
| |
Otherwise the function is not usable via generated bindings.
Fixes: 9b9dce9486a8 ('all: add 'match' setting')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This warning is from coverity against 1.18.6. But it applies
in a similar manner here.
1. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: warning: Value stored to 'priv' during its initialization is never read
# NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: note: Value stored to 'priv' during its initialization is never read
# NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 809| {
# 810| NMDeviceMacsec *self = NM_DEVICE_MACSEC (object);
# 811|-> NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# 812|
# 813| macsec_secrets_cancel (self);
|
|
|
|
| |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/493
|
|\
| |
| |
| | |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/419
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Instead of generating connections and then apply the rd.peerdns to
them, parse the option early and set it when each connection is
created.
|
| |
| |
| |
| |
| |
| |
| | |
Save the hostname read from command line to a file in /run so that it
can be applied later by the NM dracut module.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/419
|
|/ |
|
| |
|
|\
| |
| |
| | |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/473
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
|/
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1755768
|
|
|
|
| |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/489
|
|
|
|
|
| |
Expect a failure when writing to /proc if the file system is mounted
read-only.
|
|\
| |
| |
| | |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/483
|
| |
| |
| |
| | |
There is only one user of the macro left. Drop it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
integers
We had three callers of nm_keyfile_plugin_kf_get_integer_list(). Two
only wanted to read values in range of guint8. One, wanted to read
unsigned integers (for which nm_keyfile_plugin_kf_get_integer_list()
was not suitable).
Instead, implement a integer list reader ourself.
One change is that g_key_file_get_integer_list() would accept list elements
with a number followed by a white space and garbage ([1]). We don't do that,
so there is a change in behavior here. That seems preferable, we don't
want to accept garbage.
The error reason text from the reader now also changes, and obviously we
no longer fail for integer values larger than G_MAXINT.
[1] https://gitlab.gnome.org/GNOME/glib/-/blob/c9bf247eb90805cc7a0020db20b8808ed42fe61c/glib/gkeyfile.c#L4445
|
| |
| |
| |
| | |
There is only one user of the macro left. Drop it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Keyfile handles GObject properties of type G_TYPE_ARRAY as a GArray
of unsigned ints. That is correct, because all our properties of this
GType happen to be of this kind.
However, then the function was using nm_keyfile_plugin_kf_set_integer_list(),
which only can handle signed integers. There was thus an assertion that all
integers were non-negative. Which, probably was also correct, because NMSettingDcb
would validate that all values of such kind are in fact positive. Anyway, that
is an unexpected limitation (if not a bug).
Fix that by handling the array as unsigned list of integers.
Also, since glib doesn't provide an API for storing lists of unsigend
integers, we have to implement our own. but that is no loss. We probably
do it better anyway.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we were preallocating a string buffer of fixed size. For guint8
we reserved 3 characters per number, which is sufficient. However, it is
not obviously sufficient. NMStrBuf would grow as needed.
Next, I will add nm_keyfile_plugin_kf_set_integer_list_uint(), where it
is more unclear how large the string can be at most. To avoid that question
from the start, it will use NMStrBuf. To keep the implementations similar,
use NMStrBuf also in this case.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split the macros to define the setter and getter so that setters
and getters are defined by separate macros. This will be used
to define the boolean getter differently, but still using the
macro to define the setter.
Also, don't construct function names in the macro. Instead, pass
the full names as argument to the macro. This helps with the problem
where ctags/cscope is unable to locate the implementation of the
function. Since we define the function with macro, the tools still
don't recognize this as the location of the definition. But at least
when showing all occurrences of the name, it can be found.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nm_setting_bridge_port_remove_vlan_by_vid()
With LTO, compiler warns:
libnm-core/nm-setting-bridge-port.c: In function nm_setting_bridge_port_remove_vlan_by_vid:
libnm-core/nm-setting-bridge-port.c:252:6: error: v_start may be used uninitialized in this function [-Werror=maybe-uninitialized]
252 | if (v_start == vid_start && v_end == vid_end) {
| ^
libnm-core/nm-setting-bridge-port.c:239:10: note: v_start was declared here
239 | guint16 v_start, v_end;
| ^
libnm-core/nm-setting-bridge-port.c:252:28: error: v_end may be used uninitialized in this function [-Werror=maybe-uninitialized]
252 | if (v_start == vid_start && v_end == vid_end) {
| ^
libnm-core/nm-setting-bridge-port.c:239:19: note: v_end was declared here
239 | guint16 v_start, v_end;
| ^
Avoid the (false positive) warning.
|
|
|
|
| |
Fixes: e468b48ab7b8 ('nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environment')
|
|\
| |
| |
| | |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/485
|
| |
| |
| |
| | |
Handle the error case first and return early.
|