An interface would make sense to allow the actual device-factory to inherit
from another type.
However, glib interfaces make code much harder to follow and less
efficient. The device factory shall be a very simple type with meta data
about supported device types and the ability to create device instances.
There is no need to make this an interface implementation, instead just
let the factories inherit from NM_TYPE_DEVICE_FACTORY directly.
Don't have the test recompile parts of the settings plugin.
Instead, build one core library that is used both by the test
and the settings plugin.
Advantage: might save some compilation time, but more importantly: the
test use the same object code then NetworkManager itself, avoiding
different behavior due to compilation flags.
We don't need need separate unit tests for basic tests that can
just run in the same test-run. If you really need to run only
a particular set of tests, try
./src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -p /settings/plugins/ifcfg-rh/utils
Results in less compilation (time), and less binaries to test during
`make check`.
Previously, the default values were only printed if the corresponding
section was already present. Fix that.
Also, we call nm_config_data_log() also to dump the configuration
into the logfile. In that case (!stream), exclude the default values.
VPN_PLUGIN is special. With
# nmcli general logging level TRACE domains ALL
the logging verbosity of VPN_PLUGIN domain should not be set higher then
info. The user has to explicitly set it via:
# nmcli general logging level TRACE domains ALL,VPN_PLUGIN:TRACE
This was not the case for
# nmcli general logging level TRACE
Fix that.
nm-logging.c:213:1: error: ‘syslog_identifier_full’ defined but not used [-Werror=unused-function]
syslog_identifier_full (const struct Global *gl)
^
Fixes: fd12aa1b20
The default wired connection is already generated allowing the use of a fake
address, but for the state file and the device matching specs only non-fake
addresses are used. Let's allow fake addresses consistently, so that default
wired connections work properly in containers (where the veth address is
considered fake) as well.
Also, it would really be a better idea to use ifnames everywhere instead, but
that would change the format of the state file.
All callers of request_wireless_scan() cleared the periodic scan
source immediately before calling the function, so just move that
into request_wireless_scan(). The only one that doesn't clear
it is request_wireless_scan_periodic() but that sets the source
id to 0 already, so the clear has no effect.
https://mail.gnome.org/archives/networkmanager-list/2016-October/msg00012.html
Some TTY drivers or devices appear to ignore port speed and always
report zero. Technically this means the port is hung up and control
lines should be disconnected, but with USB devices many of the serial
port attributes are meaningless and ignored by some devices.
pppd requires the port's speed to be greater than zero, and will
exit immediately when that is not the case, even though these
modems will work fine. Passing an explicit speed to pppd in this
case works around the issue, as pppd attempts to set that speed
on the port and doesn't actually care if that operation fails.
https://bugzilla.redhat.com/show_bug.cgi?id=1281731
First of all, G_LOG_DOMAIN only matters when using g_log() directly.
Inside core, we always want to log via nm-logging. Every call to a
g_log() is a bug in the first place (like a failed assertion that logs
a g_critical() during g_return_if_fail()).
So, for all practic purposes, the logging domain is not used.
For nm-logging, the G_LOG_DOMAIN has no effect. Unless we find a proper
use of this domain, G_LOG_DOMAIN should not differ from what the rest of
core.
NMAccessPoint was in file "nm-wifi-ap.h" with
method nm_ap_*(). Make the naming consistent.
Also rename "nm-wifi-ap-utils.*" as it contains general
purpose wifi utilities. No need to have special "ap" utilities.
Same for "test-wifi-ap-utils.c". It just contains general wifi
tests.