No actual reloading is yet implemented. Later we will decide
on specific configuration parameters where we support reloading.
They must be then implemented one-by-one.
Some configuration parameters can be set via command line.
If a parameter is set from command line, the original value
from command line will still be preserved after reloading.
(cherry picked from commit 82cfd5ad47)
The NMConfig class should be immutable and its properties should
not change, with one exception: the NMConfigData property.
Later, when changing/reloading a configuration, NMConfig will only swap
the NMConfigData instance.
The NMConfigData instance itself is also immutable.
(cherry picked from commit 076478505d)
Make nm_config_new() usable without accessing static/singleton data.
nm_config_setup() is now used to initialize the singleton.
Still, you must not call nm_config_get() before calling
nm_config_setup() or after freeing the provided singleton
instance.
(cherry picked from commit 1ff5154369)
Currently the three parameters for the connectivity check (uri, interval, response)
don't get reset. Soon they might be modified at any time when reloading the
configuration.
When calling the asynchronous HTTP connectivity check, we want to
preserve the original parameters so that the result callback still can
access them later. Pass the uri and response parameter on as
ConCheckCbData.
(cherry picked from commit 5ee18c124b)
None of these functions was checking if the same operation had already
been performed, or if the object being removed/unexported was known.
(cherry picked from commit fe96dbc0ee)
Move the cleanup of the generated assumed connection to active connection
dispose. If the connection vanishes earlier (explicit deletion from client),
tear down the reference so that we don't try to remove it redundantly.
NetworkManager[9221]: <info> (eth2): device state change: deactivating -> disconnected (reason 'connection-removed') [110 30 38]
NetworkManager[9221]: <info> (eth2): deactivating device (reason 'connection-removed') [38]
(NetworkManager:9221): GLib-GObject-WARNING **: g_object_weak_unref: couldn't find weak ref 0x496610(0x7c2ba0)
Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff4d4f1a4 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffd860) at gmessages.c:1046
1046 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt
#0 0x00007ffff4a2cc60 in g_logv (log_domain=0x7ffff4d4f1a4 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffd860) at gmessages.c:1046
#1 0x00007ffff4a2ce9f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1079
#2 0x000000000049780b in nm_dbus_manager_unregister_object (self=0x7c2ba0 [NMDBusManager], object=0x80f3e0) at nm-dbus-manager.c:921
#3 0x000000000047cc83 in nm_settings_connection_signal_remove (self=self@entry=0x80f3e0 [NMIfcfgConnection]) at settings/nm-settings-connection.c:1752
#4 0x000000000047cd22 in do_delete (connection=0x80f3e0 [NMIfcfgConnection], callback=0x479d60 <ignore_cb>, user_data=0x0) at settings/nm-settings-connection.c:687
#5 0x00000000004b1eb6 in active_connection_remove (self=self@entry=0x8701c0 [NMManager], active=active@entry=0x8b02f0) at nm-manager.c:292
#6 0x00000000004b2174 in _active_connection_cleanup (user_data=<optimized out>) at nm-manager.c:316
#7 0x00007ffff4a25aeb in g_main_context_dispatch (context=0x7be3a0) at gmain.c:3111
#8 0x00007ffff4a25aeb in g_main_context_dispatch (context=context@entry=0x7be3a0) at gmain.c:3710
#9 0x00007ffff4a25e88 in g_main_context_iterate (context=0x7be3a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#10 0x00007ffff4a261b2 in g_main_loop_run (loop=0x7be460) at gmain.c:3975
#11 0x0000000000432f55 in main (argc=1, argv=0x7fffffffded8) at main.c:460
(gdb)
https://bugzilla.gnome.org/show_bug.cgi?id=744812
(cherry picked from commit 74ed416d84)
Ensure it's always (before address configuration starts and on updates) >= 1280
and not higher than the device MTU.
(cherry picked from commit fbf3a93c6bb88632ca4c8480ddbd04ca1dee151a)
Just a refactoring, no functional change. This will make it easier to
coordinate the device MTU with IPv6 MTU.
(cherry picked from commit 86696e17fd205de91e36998d524584335163d32b)
Just a refactoring, doesn't make any actual difference. It is consistent with
IPv4 and will make it easier to implement a policy to recover from incorrect
MTUs settings.
(cherry picked from commit f77784b0fdf8abb1e3c796ffc4c2b6c624f17b18)
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.
Use _nm_log() in places that already checked whether logging
is enabled. No need to check again as done by nm_log().
(cherry picked from commit 4526b55a51)
Conflicts:
src/nm-route-manager.c
The actual logging implementation is not supposed to be called
directly, because there are macros that capture the call site
information __FILE__, __LINE__, and G_STRFUNC.
Rename the function to make clear that this is the actual
implementation.
(cherry picked from commit 211d241ab0)
Conflicts:
src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h
We don't want to pass unknown format strings to the logging
macro. Catch that by concatenating "" with the format string.
(cherry picked from commit 2458ddf5e9)
A gnu extension to printf adds the format specifier "%m"
to print @errno. To preserve the error number until the
point where the logging statement is constructed, pass
it as an additional argument to _nm_log().
This is not (yet) used from NM internal code. But systemd is adding
similar functionality to its logging functions. Add the same also to
nm-logging, to support systemd's usage of "%m".
(cherry picked from commit 5162426d41)