The identifying properties of a route are (in libnl)
.o_id_attrs = (ROUTE_ATTR_FAMILY | ROUTE_ATTR_TOS |
ROUTE_ATTR_TABLE | ROUTE_ATTR_DST |
ROUTE_ATTR_PRIO),
NM ignores routes other then in table RT_TABLE_MAIN and considers
only the tuple 'family,network/plen,metric' as identifying for a route.
We must also ignore routes with TOS non-zero as we cannot
handle those, i.e. we cannot distinguish between them.
(cherry picked from commit af2c0ef771)
Update last_config outside of the conditional; otherwise it will
always remain set to NULL.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-By: Thomas Haller <thaller@redhat.com>
(cherry picked from commit db4d83d5a4)
Conflicts:
src/nm-iface-helper.c
Saw some g_warning() about g_object_weak_unref() trying to unref a non
registed reference. While this does not fix it, let's assert that
situation a step earlier to ease debugging.
Also, move g_object_weak_ref() closer to adding the object into the
@exported hash.
[thaller@redhat.com: rewrote commit message, change to register_object()]
(cherry picked from commit 9b07ea77b8)
nm_ethernet_address_is_valid() did not check whether @addr was a valid
address in the first place. It only checked whether the address was not
equal to a few notorious MAC addresses.
At the same time, be more forgiving and accept %NULL as argument.
This fixes an assertion nm_ap_match_in_hash().
(cherry picked from commit 842ec6163d)
This is a well known issue that we cannot convert some libnl
objects to NMPlatformObject. The to-string function for libnl
objects is only used for debug logging. No need to assert.
(cherry picked from commit 8f080747c6)
NM already understands the command line argument --g-fatal-warnings
which causes setting of g_log_set_always_fatal().
Also interpret the "fatal-warnings" token in NM_DEBUG environment
variable and in main.debug configuration setting.
Usage hint: either set
$ export NM_DEBUG=RLIMIT_CORE,fatal-warnings
or add the following section to NetworkManager.conf
[main]
debug=RLIMIT_CORE,fatal-warnings
https://mail.gnome.org/archives/networkmanager-list/2015-March/msg00093.html
(cherry picked from commit 10cde91f10)
There's no reason the dispatcher test files should have "old" in their
names, since they're testing the current dispatcher interface.
(cherry picked from commit 9cfd9d376f)
For tests with assert-logging enabled, we already printed
the message with g_print(), instead of g_message().
We always want to print this value, because it is important
to reproduce a test failure. Hence, just (always) print
directly to stdout.
Also, add a leading newline, because the output was attached
to the previous line.
(cherry picked from commit 4ab540939c)
When disabling assert-logging with no-expect-message,
print a line at every g_test_assert_expected_messages()
invocation.
(cherry picked from commit 373d09b042)
On the end of the test there should be no unchecked expected
messages. Register a destructor function in nmtst to assert
against that.
Also call nmtst_free() in the destructor. That way, we always release
the allocated data without requiring the test to do it explicitly.
(cherry picked from commit bb90127c2a)
Add new capabilities CAP_FREQ_2GHZ and CAP_FREQ_5GHZ to indicate the
frequency bands supported by a Wifi device.
Add also CAP_FREQ_VALID, which is set when the values of the other 2
capabilities are available.
Original patch by Dan Williams <dcbw@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=723295
(cherry picked from commit aabc6fc57b)
Same for nmtst_platform_ip6_routes_equal().
It's useful to check for equal routes ignoring the ordering.
(cherry picked from commit 57453189e0)
Conflicts:
src/tests/test-route-manager.c
Don't use g_message() in platform tests for test messages.
This is a partial backport of commit 5fd3827,
"route-manager/test: fix usage of g_assert_expect_message()"
(cherry picked from commit 5fd3827e49)
Before, when having a test with nmtst_init_assert_logging(),
the caller was expected to setup logging separately according
to the log level that the test asserts against.
Since 5e74891b58, the logging
level can be reset via NMTST_DEBUG also for tests that
assert logging. In this case, it would be useful, if the test
would not overwrite the logging level that is set externally
via NMTST_DEBUG.
Instead, let the test pass the logging configuration to
nmtst_init_assert_logging(), and nmtst will setup logging
-- either according to NMTST_DEBUG or as passed in.
This way, setting the log level works also for no-expect-message
tests:
NMTST_DEBUG="debug,no-expect-message,log-level=TRACE" $TEST
(cherry picked from commit b6d3b98655)
For glog messages to print any debug messages, we must set G_MESSAGES_DEBUG.
nmtst does this for us if we set @is_debug. But fix the condition to
also set G_MESSAGES_DEBUG if set set c_log_level to DEBUG or TRACE.
(cherry picked from commit 3abeb7f2b9)
In theory, NM_VPN_PLUGIN_ERROR should have names under
org.freedesktop.NetworkManager.VPN.Plugin, but for historical reasons,
it's actually org.freedesktop.NetworkManager.VPN.Error.
(cherry picked from commit 773f047eef)
teamd can recover interface state on its own, so if it died unexpectedly
we don't need to fail the device. Also, if for some reason a teamd is
already up and running when activating the interface, we can ask for
its configuration and if it has the same configuration we are about to
use, just talk to the existing copy instead of killing it.