make distcheck runs a build in dist directory subtirs and then runs intltool -m
which in turn complains about translations in a built file:
The following files contain translations and are currently not in use. Please
consider adding these to the POTFILES.in file, located in the po/ directory.
sub/policy/org.freedesktop.NetworkManager.policy.in
The issue is reported to intltool upstream already:
https://bugs.launchpad.net/intltool/+bug/1117944
The link test was disabled in commit 67ad3fcb5b.
The previous issues are not fixed, but apparently disabling the test doesn't
help to get it fixed.
Re-enable it and if it fails we have a better reason to fix it.
Or maybe it works now (?). Didn't fail for me...
Throwing away the udev_device instance is wrong. There are two cases:
- the udev-device appears, and the netlink object will never appear
(or is already gone). In this case, keeping the udev-device is ok
because we will eventually get a signal from UDev to cleanup the
device instance.
- the udev-device appears before the netlink object. In this case we
want to keep the udev instance to have it ready.
Fixes: 388b7830f3
dns-manager must include <gio/gio.h> itself. Otherwise
compilation only works with WITH_LIBSOUP, which includes
<gio/gio.h> via <libsoup/soup.h>.
This is an old error, but unnoticed until ad6dbc504b
which makes use of gio.h also without NETCONFIG_PATH.
Add a new 'rc-manager' configuration parameter that allows to select
the strategy used to write resolv.conf; currently supported values
are: none|resolvconf|netconfig, 'none' meaning that NM directly writes
the file.
The default value of the parameter is 'none'; however if a
RESOLVCONF_PATH (or NETCONFIG_PATH) is specified at build time, the
default value will be 'resolvconf' (or 'netconfig').
glib interprets the options either as "-m arg" or "-m=arg". Fix parsing
to check for both cases.
Also, g_test_init() removes the parsed options from argv, hence we must
check our original copy in __nmtst_internal.orig_argv.
Now the following all have the same outcome:
$ NMTST_DEBUG=no-debug,quick ./src/rdisc/tests/test-rdisc-fake
$ ./src/rdisc/tests/test-rdisc-fake -m quick
$ ./src/rdisc/tests/test-rdisc-fake -m=quick
Fixes: a2edd6445f
A solicitation loop could result for two cases:
1) a router sent DNS information, then removed that information without
sending it with lifetime=0
2) two routers exist, one sending DNS information and the other not, and
the first router which sends DNS information disappears
In these cases a solicitation would be generated when the DNS information
reached 1/2 its lifetime. A router would then reply to the solicitation
without DNS information, which would then trigger another lifetime check,
which finds that the DNS info is still 1/2 lifetime. Which triggers
another solicitation, etc.
Fix this by ensuring that a solicitation is never sent less than
rtr_solicitation_interval seconds after the last one.
If a route or gateway's priority increased, the item would be added
to the array again without removing the older entry. At the same time
don't bother adding an item with a zero lifetime, since it will just
be removed again by the clean_* functions.
Instead of having it all in the Linux implementation, move all the
timeout logic and most of the processing logic into the NMRDisc
base class so that it can be used by NMFakeRDisc as well. This
will help increase testability since now we can test the timeout
and expiry logic from the fake plugin too.
Utility function for long-running tests to check whether
they should run. It has the same use as g_test_quick(),
but it can also be set via NMTST_DEBUG environment variable.
You can set the compile time default via
CFLAGS='-DNMTST_TEST_QUICK=FALSE' ./configure
and overwrite it at runtime via
NMTST_DEBUG=no-default,quick ./tests/test-my
Always intern string from udev_get_driver().
We use the result of udev_get_driver() for setting NMPlatformLink.driver.
In all other cases, we already set that value to an interned string,
which simplifies memory handling.
As it was, the lifetime of that string was tied to the lifetime of the
GUdevDevice.
This is not a stelar solution, but we assume that the overall numbers
of different drivers is limited so we don't leak large amounts of
memory.
link_extract_type() would return the NMLinkType and a
@type_name string. If the type was unknown, this string
was rtnl_link_get_type() (IFLA_INFO_KIND).
Split up this behavior and treat those values independently.
link_extract_type() now only detects the NMLinkType. Most users
don't care about unknown types and can just use nm_link_type_to_string()
to get a string represenation.
Only nm_platform_link_get_type_name() (and NMDeviceGeneric:type_description)
cared about a more descriptive type. For that, modify link_get_type_name()
to return nm_link_type_to_string() if NMLinkType could be detected.
As fallback, return rtnl_link_get_type().
Also, rename the field NMPlatformLink:link_type to "kind". For now this
field is mostly unused. It will be used later when refactoring platform
caching.
Given the name nm_link_type_to_string(), we would not expect
to find it in nm-linux-platform.c. It either should be named
nm_platform_link_type_to_string() and be put in a new
nm-platform-utils.c file, or it should be named
nm_utils_link_type_to_string() and be put in NetworkManagerUtils.h.
For now, just leave it here.
prevents:
NetworkManager[2775]: <error> [1429889302.113450] [NetworkManagerUtils.c:576]
nm_utils_kill_child_async(): kill child process 'teamd' (3025): failed due
to unexpected return value -1 by waitpid (No child processes, 10) after
sending SIGTERM (15)
link_extract_type() would call tun_get_properties() to determine whether
the link if a TAP or TUN device. The previous implementation would
receive the ifindex, and resolve the ifname via lookup in the platform
cache.
This means, the call on link_extract_type() will only succeed to detect
the TUN/TAP properties, if the libnl object is already in the cache.
Currently that is always the case and there is no problem.
It is desireable, that we can resolve the link type of an object without
consulting the platform cache first.
ASSERT_VALID_PATH_COMPONENT() always returns the input argument --
unless it fails an assertion and terminates the program. No need
to require the user to use the return value.
See "Revert "wireless: Support of IFLA_INFO_KIND rtnl attribute""
http://www.spinics.net/lists/linux-wireless/msg132219.html
The reverted kernel patch caused rtnl_link_get_type() to return "wlan"
for WiFi devices. Since NM depends on this function returning
NULL for WiFi devices so that it goes on to check the sysfs DEVTYPE
attribute, the kernel patch caused WiFi devices to show up as Generic
ones instead. That's wrong, and NM should be able to more easily
handle changes in the kernel drivers from NULL to a more descriptive
rtnl_link_get_type() return, since that's the kernel trend.
What NM should be doing here is to fall back to other detection
schemes if the type is NULL or unrecognized. Make that happen and
clean things up to use a table instead of a giant if(strcmp()) block.
https://bugzilla.gnome.org/show_bug.cgi?id=743209