This way it's consistently used across all manual page without a need
for XSL templating.
Also, the entities file could in future possibly be used to template the
build-time configurables such as filesystem paths or bug tracker URL.
It's injected from the makefile, but not even used consistently or included in
the resulting render of manual page. Which is good, otherwise we'd have a
non-reproducible build with possible multilib conflicts if rendered around
midnight.
No functional change, just a readability improvement. No need to prefix
the variables with docbook_ and docbook_generated -- all manual pages
are generated from docbook.
If the manager removes the device, the IP config objects must
be cleared. The reason is that NMPolicy registers to the IP config
changed signal and passes these object on to NMDnsManager.
If the INTERNAL_DEVICE_REMOVED signal is emited with IP configuration
object pending, those objects will be leaked.
This partly redoes commit f72816bf10,
which was reverted.
Co-Authored-By: Thomas Haller <thaller@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=764483
We want to unregister the signals at cleanup time via
g_signal_handlers_disconnect_by_data(). This saves us from
storing the signal handler id or by naming the function
explicitly via g_signal_handlers_disconnect_by_func().
However, the registered user-data @self is a public pointer. That
is ugly, because potentially another component could register a
signal with passing the public @self pointer as user-data.
Although that doesn't currently happen, it is more correct to register
with a private pointer to avoid this case altogether.
Instead of a G_TYPE_INSTANCE_GET_PRIVATE() call every time,
fetching the private data becomes a pointer dereference.
As only one instance of NMPolicy exists, this costs us only
one additional pointer of memory.
Software devices created by NM should be kept up when quitting so that
they can be assumed upon restart. But now we consider devices created
by NM (those with the @is_nm_owned flag) not capable of assuming
connections and therefore we tear them down and deconfigure when
quitting.
Change this and ignore @is_nm_owned when deciding if a device can be
re-assumed.
First let the device know it's being removed soon so that it has a
chance to clean up the IP configuration early.
If the manager removes the device fist, the policy never learns of
config removal and doesn't unhook it from the DNS manager resulting in a
IPConfig leak and possible wrong DNS configuration in effect.
Also adjust the route manager to skip over devices without IP
configuration when determining the best connection; it is perhaps
just due to being removed.
https://bugzilla.gnome.org/show_bug.cgi?id=764483
Later in NMDevice's rdisc_config_changed(), we already reject
routes with plen==0. Just do it earlier.
We would however not reject bogus routes with a prefix larger then 128.
That would later lead to an error when trying to add such a route to the
kernel.
Don't use memset() and set the fields afterwards. Instead use
designated initializers.
Also, move the temporary variables closer to where they are used.