It helps listing or searching for slave connections. For example, one can do
$ nmcli -f name,uuid,type,slave connection show | awk '$NF == "bridge"'
to show all bridge slave connections.
We used MASTER, BRIDGE and TEAM_MASTER keys for a differnet purpose than the
network.service did, confusing the legacy tooling. Let's do our best to write
compatible configuration files:
* Add *_UUID properties that won't clash with initscripts
* Ignore non-*_UUID keys on read if *_UUID is present
* If the connection.master is an UUID of a connection with a
connection.interface-name, write the uuid into the *_UUID key while setting
the non-*_UUID key to the interface name for compatibility
https://bugzilla.redhat.com/show_bug.cgi?id=1369091
As build-requirement, we either require
- python2 with python-gobject-base
- python3 with python3-gobject-base
Previously, we would require that a plain `python` gives the desired
interpreter version.
If somebody's "/usr/bin/env python" however points to a different
python version, there was no easy way to change it -- aside
resetting the $PATH variable to some desired "python" binary.
Now, you can specify it during configure:
./configure PYTHON=python3 ...
This especially matters, if you only have python3-gobject-base
installed, you /usr/bin/python is a symlink to python2.
https://bugzilla.gnome.org/show_bug.cgi?id=775768
Currently ipv4 and ipv6 settings share the ifcfg plugin vars for the
dhcp-hostname and dhcp-send-hostname options (DHCP_HOSTNAME and
DHCP_SEND_HOSTNAME). Add brand new vars DHCPV6_HOSTNAME and
DHCPV6_SEND_HOSTNAME to have var-property one to one mappings.
When those values are missing they are already considered as TRUE.
As they are written also when DHCP is not enabled, write them only
if they have a value different from the default.
- also when called from makefile, allow enabling valgrind even if it was not
enabled via configure option. That is, even if you configured --without-valgrind,
you can run tests via `NMTST_USE_VALGRIND=1 make check`. Previously, there
was no way to run on valgrind during `make check` unless you also had
configured --with-valgrind.
- Use $NMTST_VALGRIND variable to override the valgrind path. This now
always takes precedence. For `make check`, the path can be determined
by the configure script.
If all unspecified, as last fallback "valgrind" is searched in the current
$PATH.
- Allow to specify the suppressions file via $NMTST_SUPPRESSIONS.
If unset, fall back to the default. The default during `make check`
is determined by the configure options. The default for manual
invocation is our one valgrind.suppressions file.
To use no suppressions file, set NMTST_SUPPRESSIONS to empty.
Now, regardless of what you enabled during ./configure, you can
overwrite it via:
$ NMTST_USE_VALGRIND=1 \
NMTST_VALGRIND=~/bin/valgrind \
NMTST_SUPPRESSIONS=my-suppressions \
make check
If a connection is ACTIVATED and another one is ACTIVATING but there
is no global connectivity, we currently set the manager state to
CONNECTING and start a connectivity check to verify whether the
manager state can be promoted to CONNECTED_GLOBAL.
If this connectivity check fails, we shouldn't promote a CONNECTING
state to CONNECTED_SITE.
Fixes: 084da69a30
The manager state is already computed every time an active connection
changes state, it is not necessary to call nm_manager_update_state()
also when the property is read.
Moreover, nm_manager_update_state() emits a "notify::state" signal
which causes a re-read of the property by the nm-exported-object,
resulting in a nested execution of nm_manager_update_state().
We call nmp_utils_ethtool_get_driver_info() twice when receiving a
netlink message, but we don't need a clone of the string values.
Instead, expose a data structure that should be stack allocated
by the caller.
The ioctl APIs ethtool/mii require an interface ifname. That is inherrently
racy as interfaces can be renamed. This cannot be fixed, we can only
minimize the time between verifying the ifname and calling ioctl.
We already had problems with that when ethtool would access an interface
by name that didn't exists. See commit ab41c13b06 .
Checking for an existing interface only helps avoiding races when an interface
gets deleted. It does not help against renaming.
Go one step further, and instead of checking whether such an ifname
exists, try to get the ifname based on the ifindex immediately before
we need it.
This brings an additional overhead for each ethtool access.
A reimplementation of g_file_get_contents() to overcome two limitations:
- nm_utils_file_get_contents() accepts a @dirfd argument to open the
file relative using openat().
- nm_utils_fd_get_contents() allows to read the content from a file
filedescriptor.
- both support a max_length argument, to fail gracefully if we
get tricked into loading a huge file.
- use nm_auto_close cleanup attribute
- optionally, return the found ifname
- don't stat "phy80211". If such an entity can be opened,
just assume it's a directory.
Similar to systemd's PROTECT_ERRNO. The difference it, that it doesn't
treat the auto-variable as internal, so it is allowed to use it. E.g.
if (!(fd = open (...)) {
NM_AUTO_PROTECT_ERRNO (errno_saved);
printf ("error: %s", g_strerror (errno_saved));
return FALSE;
}
It would be nice that our logging functions are guaranteed to
preserve errno. We are currently not very consistent about handling
errno, let's improve on that.