Calling read_entire_config() without passing a @cli argument would
always have caused an assert due to unset @o_config_main_file.
That is not a real problem as that situation didn't arise. Still
fix it.
When update_dns() fails, callers expect 'error' argument to point to a
non-NULL error; but we are reusing the same variable when calling
update_resolv_conf() to update the private resolv.conf and thus the
function may return an empty error on failure.
Don't reuse the same error and pass a NULL argument instead, since we
don't care about errors when updating private resolv.conf.
Fixes: 5f9d348c20
Renable checking owner of keyfile files but disable that
behavior for tests.
For that, add a nm_utils_get_testing() function to core to detect
whether the code is running as part of a test.
https://bugzilla.gnome.org/show_bug.cgi?id=701112
Code that is testable often needs special hooks to work
both for unit-tests and production.
Add a function nm_utils_get_testing() that returns whether
the code is run as part of a unit-test.
For non-testing mode, nm_utils_get_testing() will return
zero (NM_UTILS_TEST_NONE). For unit tests, the test should call
_nm_utils_set_testing() to configure tested functions.
By specifing the @flags attribute, the test can enable/disable
specific behaviors.
https://bugzilla.gnome.org/show_bug.cgi?id=701112
nm_device_factory_manager_find_factory_for_link_type()
easily can see a link-type NM_LINK_TYPE_UNKNOWN because
there are many link types that NetworkManager cannot detect.
Just return NULL early.
Fixes: 71bde20c30
Support accepting more then one signal at a time.
It is to be expected, that one change in platform raises
several signals. Extend the assertion helpers to express
that.
Up to now, this code was correct. Later we will add another field
to NMPlatformIP4Route which causes the test to operate on
uninitialized data.
Instead of explicitly initializing the field, just clear the whole
struct.
And nmtst_platform_ip6_routes_equal().
As already indicated by the comment, using memcmp() doesn't really work
here. It worked up to now, because the NMPlatformIP4Route structure has no
padding at the end.
If we would have a last 'guint8' member (as we will add later),
initializing an arry of routes on the stack would not clear the bytes
from the padding and the comparison using memcmp() would fail.
Add a comment about the upstream bug that fixes
the suppressed memleak in libnl.
Also, add a different backtrace for the same bug.
It currently doesn't hit easily, because we don't
call nl_msg_parse() often. In the future we will
though.
Try to set the MTU of the parent Ethernet interface to match the
requested PPP MTU and MRU. This allows the negotiation of a PPP MTU
and MRU greater than 1492.
We switched to user-mode PPPoE client to work around a bug in kernel
PPPoE code that caused pppd not to be notified when the connection was
terminated with a PADT before the LCP Termination Request.
The kernel bug has now been fixed upstream with commit 287f3a943fef
"pppoe: Use workqueue to die properly when a PADT is received", queued
for v4.1.
Since the issue affected only very particular scenarios and could
somehow be solved with the right configuration (see bugzilla entry),
we can safely revert the patch and restore the use of kernel mode
PPPoE.
This reverts commit 7955806a02.
https://bugzilla.gnome.org/show_bug.cgi?id=742939
==21573== Syscall param mount(type) points to unaddressable byte(s)
==21573== at 0x854B9BA: mount (syscall-template.S:81)
==21573== by 0x158922: main (test-common.c:295)
==21573== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21573==
{
<insert_a_suppression_name_here>
Memcheck:Param
mount(type)
fun:mount
fun:main
}
Fixes: d6aef9c188
When a connection had static IP addresses, an early event
from plaform would clear them from priv->con_ip4_config.
Fix that, by don't initializing priv->con_ip4_config
before we commit the first time.
https://bugzilla.gnome.org/show_bug.cgi?id=749052
Fixes: 557667df12