declassify bad combinations of auto-negotiate, duplex and speed
properties values from _VERIFY_NORMALIZABLE_ERRORS to
_VERIFY_NORMALIZABLE. This would preserve compatibility with legacy
nm-connection-editors.
Also, ifnet plugin would read the configuration value, which is just wrong
because:
- the configuration might not be set and ifnet would fail to fallback
to the compile time default.
- the configuration only is in effect if the plugin is also available.
Otherwise, we fallback to the next plugin.
Only the dhcp-manager knows which DHCP plugin is in use.
Since commit fb2ca0ce3d we would no longer pre-set the main.plugins
value in NMConfig's keyfile to recognize unset default settings.
This breaks with
[main]
plugins+=foo
which now results in
main.plgin=foo
while previously it would have extended the compile time default.
https://bugzilla.redhat.com/show_bug.cgi?id=1397938
Fixes: fb2ca0ce3d
Instead of having the caller do the fallback to the compile time default
plugins, let it be handled by nm_config_get_plugins().
The knowledge of fallback to a compile time default (and how to do that
properly) should be inside NMConfig/NMConfigData alone.
Also, as this function is only called once, let NMConfig not cache
the string list but create it once as needed.
From valgrind:
==21921== Invalid free() / delete / delete[] / realloc()
==21921== at 0x4C2CD5A: free (vg_replace_malloc.c:530)
==21921== by 0x81C4F2D: g_free (gmem.c:189)
==21921== by 0x81AB021: g_error_free (gerror.c:491)
==21921== by 0x81AB325: g_clear_error (gerror.c:674)
==21921== by 0x767B555: reg_request_cb (nm-secret-agent-old.c:616)
==21921== by 0x7A211F2: g_task_return_now (gtask.c:1107)
==21921== by 0x7A21228: complete_in_idle_cb (gtask.c:1121)
==21921== by 0x81BF6B9: g_main_dispatch (gmain.c:3154)
==21921== by 0x81BF6B9: g_main_context_dispatch (gmain.c:3769)
==21921== by 0x81BFA6F: g_main_context_iterate.isra.29 (gmain.c:3840)
==21921== by 0x81BFB1B: g_main_context_iteration (gmain.c:3901)
==21921== by 0x7A4748C: g_application_run (gapplication.c:2381)
==21921== by 0x118AEF: main (main.c:81)
It caused memory corruption and may result in strange nm-applet crashes.
If auto-negotiate is switched off, enforce that both speed and duplex
are set or unset (which would mean "ignore"): if only one is set, reset
both silently and ignore link configuration.
Need to pass --path to xsltproc to find common.ent in the
build-directory.
$ git clean -fdx && NMTST_MAKE='V=1 -d' ./tools/test-build.sh man/nm-settings-ifcfg-rh.xml
When building "libnm/nm-settings-docs.xml", we require
"nm-settings-docs-overrides.xml". As we dist the overrides files,
we must consult VPATH to locate the proper version of the file.
BUILT_SOURCES only matters during `make all`, `make check`
and `make install`.
It would be nice to be able to build every target specifically
from an empty git-tree.
Drop the use of BUILT_SOURCES where we already have the explicit
dependencies declared.
# rpm -qf /usr/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service
NetworkManager-1.5.2-16352.e0c50a9703.fc24.x86_64
# rpm -qf /usr/lib/systemd/system/network-online.target.wants
file /usr/lib/systemd/system/network-online.target.wants is not owned by any package
This makes it easier to install the files with proper names.
Also, it makes the makefile rules slightly simpler.
Lastly, the documentation is now generated into docs/api, which makes it
possible to get rid of the awkward relative file names in docbook.
NOTE: changed the default value for auto-negotiate from TRUE to FALSE.
Normalization enforces that no values for speed and duplex are there
when autonegotiation is on. This is required as autoneg on with specific
speed and duplex set means to ethtool to use autonegotiation but
advertise that specific speed and duplex only.
autoneg off, speed 0 and duplex NULL means to ignore link negotiation.
Added platform functions to retrieve device link mode status and to
switch from auto to manual link negotiation:
nm_platform_ethtool_get_link_settings
nm_platform_ethtool_set_link_settings
"clients/cli/settings-docs.c" is only required for nmcli. Makefile.am will
check for the existance of the file during the build.
It doesn't matter for SETTING_DOCS_AVAILABLE.