| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
CID 76722 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement:
g_set_error(error, nm_setti....
|
|
|
|
|
| |
CID 99747 (#1 of 1): Missing varargs init or cleanup (VARARGS)
13. missing_va_end: va_end was not called for ap.
|
|
|
|
|
| |
We might receive the update of the device state to FAILED when the
active connection is still in ACTIVATING. Handle this case properly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is recomended to include <config.h> with angle brackets [1].
Note, that usually we don't include <config.h> directly, except in
two places we have to (because there we include conflicting libraries
that must be included before "nm-default.h").
In that case, define __CONFIG_H__ which is used as include guard around
<config.h> by "nm-default.h".
[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Configuration-Headers.html
|
| |
|
| |
|
|
|
|
|
|
| |
g_object_get_data() and g_object_get_qdata() end up to be identical,
except that g_object_get_data() also requires to intern the string
on every lookup (which involves a hash lookup and locking).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a type to be inheritable, its public struct (NMManager) must
be known. As nobody inherits NMManager, we can make it private.
As the struct is private anyway, we can also reuse it for the private
data directly, instead of registering NMManagerPrivate in the manager
class.
There are advantages and disadvantages:
+ simplifies debugging, as the self pointer also contains the
private data.
+ removes a small overhead of tracking the private data separately
- is a different way to implement the class, contrary to many
other classes.
- inheriting from the class later requires reverting this change
(but we will never inherit from NMManager).
- as it is now, nobody uses the priv field directly and we still
access it via NM_MANAGER_GET_PRIVATE(self). However, the presence
of the priv field might encourage us to use it directly -- which
increases above disadvantages.
|
|
|
|
|
| |
They are only useful when we want to derive a class
from NM_TYPE_MANAGER -- which we clearly don't.
|
| |
|
|\
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=765682
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The only user of the sleep-monitor singleton was NMManager anyway.
Also, even if we ever get more users that are interested in the SLEEPING
signal, we would hook them onto NMManager -- because NMManager should
collect, coordinate and possibly forward the SLEEPING signal. In no case,
another object should react on the SLEEPING signal and thus bypassing the
NMManager.
|
| |
| |
| |
| |
| | |
Having two signals is more complicated and everybody who cares about
one signal also cares about the other.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Both files do very similar things, with "nm-sleep-monitor-upower.c"
being suboptimal, for example by creating the proxy synchronously.
Clean that up in the next steps. Just basic merging for now.
|
| |
| |
| |
| | |
Next, we will merge "nm-sleep-monitor-upower.c" into "nm-sleep-monitor.c".
|
| |
| |
| |
| | |
It's not only relevant for systemd (sd).
|
|/
|
|
|
|
| |
no translations
Fixes: 753f727af566a56e548613c35a3ccffe3d212d3b
|
|\
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=765432
|
| |
| |
| |
| |
| | |
Give a direct access to the cache to lookup values there. This is only
useful for testing.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
nm_platform_ip4_route_cmp()
..., nm_platform_ip6_route_cmp(), nm_platform_ip4_address_cmp() and
nm_platform_ip6_address_cmp().
Compare those fields first, for which we expect that their properties
differ. E.g. usually, each route destination in a set is unique, thus by
comparing those fields first we shortcut some comparisons.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For addresses (NMPlatformIPAddress) the @addr_source field is ignored
on a platform level. That is, all addresses inside the platform cache
have this value set to NM_IP_CONFIG_SOURCE_KERNEL. Maybe, for that reason,
the source should not be a part of the NMPlatformIPAddress structure, but
it is convenient for users to piggy back the source inside the platform
address structure.
For routes, the source is stored in NMPlatformIPRoute's @rt_source
field. When adding a route to kernel, we set the @rtm_protocol of the
route depending on the source. However, we want to map different source
values to the same protocol value.
On the other hand, when kernel sends us a route that gets put inside
the cache, we must preserve the protocol value and must not map
different protocol values to the same source.
The reason is, that a user can add two routes that only differ by
@rtm_protocol. In that sense, the @rtm_protocol fields is part of the
unique ID of a kernel route, and thus different values must map to
different sources.
Fix this, by extending the range of NMIPConfigSource to contain
a range of protocol fields.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We handle cloned routes (that have rtm_flags RTM_F_CLONED) differently.
We used to mark such routes by hacking NMIPConfigSource to have a special
value. No longer do this, because it mixes different concepts.
Note that the rt_cloned filed fits into a hole in the aligment
of NMPlatformIPRoute. Thus there is almost no overhead to this
change.
|
| |
| |
| |
| |
| | |
Expose nmp_utils_ip_config_source_to_string() in the header file and
implement it via NM_UTILS_ENUM2STR_DEFINE().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The "source" field of NMPlatformIPRoute (now "rt_source") maps to the
protocol field of the route. The source of NMPlatformIPAddress (now
"addr_source") has no direct equivalent in the kernel.
As their use is different, they should have different names. Also,
the name "source" is used all over the place. Hence give the fields
a more distinct name.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This way, we get a defined order at startup.
Also, get rid of the logging statements. It was used for
debugging, but a "getter" really should not log the stuff it
is returning.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When performing NM package upgrade the new version of nmcli will be immediately
available while NM daemon will not, as it would not restart in order to avoid
to disrupt connectivity. This could create issues with tools leveraging
on nmcli output (till reboot). As apart from this case it is very unlikely
that a user can have this nmcli / NM daemon version mismatch situation,
the check could cause more harm than benefit in real user case
scenarios.
https://bugzilla.redhat.com/show_bug.cgi?id=1291785
|
|
|
|
|
|
|
|
|
| |
The 'portname' sysfs attribute of s390 devices is deprecated since
kernel 4.4 and always set to 'no portname required'. But even on older
kernels such value must be interpreted as an unset portname and thus
ignored.
https://bugzilla.redhat.com/show_bug.cgi?id=1327204
|
|
|
|
| |
They give each logging message a "manager: " prefix.
|
|\
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1313091
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Having a gateway defined when never-default=yes causes troubles in
connection matching and anyway makes no sense.
If the combination is found, remove the gateway during the
normalization phase.
https://bugzilla.redhat.com/show_bug.cgi?id=1313091
|
|
|
|
|
|
| |
g_file_read_link() "reads" the symbolic link. If it's a relative path,
we get a relative path which is anchored on @file. We must resolve that
to be absolute.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The notification was missing from a long time. The issue has been exposed only
now due to the c57e5a6b66b8a29d4c16dacf9aafc7ee04a27243 fix which properly
implemented the "startup-complete" notification substituting out of place code
which masked the bug.
|
|
|
|
|
|
|
| |
The top-level form was left on screen after exit (this is visible only
on some types of terminal as vt100), breaking automated tests.
Fixes: b2fb80928e27dc29240e604bab4f391302fc71f3
|
|
|
|
|
|
|
|
| |
startup_complete
We connect to notify::startup-complete signal of each connection,
but after we signal startup-complete once, we don't need that
signal anymore. Disconnect.
|
|\
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=765387
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following settings are effectively identical:
dns=none,rc-manager=*any*
dns=none,rc-manager=unmanaged
dns=default,rc-manager=unmanaged
The new setting is only there for completeness and only
makes sense for a dns plugin.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Already previously, the mode and rc-manager were intertwined in a complicated
way:
- dns=none effectively disables rc-manager.
- if resolv.conf was immutable, it would disable the rc-manager
by setting "resolv_conf_mode=NM_DNS_MANAGER_RESOLV_CONF_UNMANAGED".
- resolv_conf_mode was anyway a redundant piece of information to
rc_manager.
Now there are only two relevant settings: priv->plugin and
priv->rc_manager. And they can be set independently from each other.
Before that was not possible. For example, you could not set a
dns plugin with rc-manager=unmanaged (the only way to achive that
was via an immutable resolv.conf or by having rc-manager=symlink
and let resolv.conf link somewhere else.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The "dns" and "rc-manager" properties are strongly related. Initialize them
together in init_resolv_conf_mode().
One difference is, that we now set rc_manager before setting the mode.
But that shouldn't matter.
|
| |
| |
| |
| |
| | |
Makes more sense in the next commit, when init_resolv_conf_manager()
gets merged with init_resolv_conf_mode(). Bear with me.
|
|/
|
|
|
|
| |
We already have "rc-manager=file", rename "rc-manager=none" to "symlink"
because that better describes what it is actually doing. Of course, the
old name is still accepted.
|