| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Only move the ignore-carrier option from NMConfig to
NMConfigData. The ignore-carrier option is still
immutable after startup.
https://bugzilla.gnome.org/show_bug.cgi?id=748050
|
|
|
|
|
|
|
|
|
|
|
| |
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').
|
|
|
|
|
|
|
|
| |
The configuration snippets are loaded in alphabetical order.
Fix the printed description to reflect that order. Otherwise,
NM logs at startup:
<info> Read config: /etc/NetworkManager/NetworkManager.conf and conf.d: 20-connectivity-fedora.conf, 10-ibft-plugin.conf
|
|
|
|
|
| |
This will make is possible for the NMDnsManager to watch for
configuration changes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are three configuration options that contain device specs:
'main.ignore-carrier', 'main.no-auto-default', and
'keyfile.unmanaged-devices'.
Unify the parsing of them by splitting the device spec with
nm_match_spec_split(). This changes behavior for parsing of these
properties.
Also get rid of logging warnings when parsing 'keyfile.unmanaged-devices'.
|
|
|
|
|
|
|
| |
Useful for using the feature without having to hardcode it in configuration
(container set up scripts, development).
https://bugzilla.gnome.org/show_bug.cgi?id=744241
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
With this change, NMConfig is really immutable and all
modifyable parts migrated to NMConfigData.
Another advantage is that components can now subscribe to
NMConfig changes to pickup changes to no-auto-default.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Every reload might change the main_file and description.
Move those properties to NMConfigData.
|
| |
|
|
|
|
| |
NMConfig
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The name "nm_conf_path" and cli.config_path" were not consistent.
Rename them both to "config_main_file".
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
config.h should be included from every .c file, and it should be
included before any other include. Fix that.
(As a side effect of how I did this, this also changes us to
consistently use "config.h" rather than <config.h>. To the extent that
it matters [which is not much], quotes are more correct anyway, since
we're talking about a file in our own build tree, not a system
include.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
When quitting, the Manager asks each device to spawn the interface helper,
which persists and manages dynamic address on the interface after NetworkManager
is gone. If the dynamic address cannot be maintaned, the helper quits and
the interface's address may be removed when their lifetime runs out.
To keep the helper as simple as possible, NetworkManager passes most of the
configuration on the command-line, including some properties of the device's
current state, which are necessary for the helper to maintain DHCP leases
or IPv6 SLAAC addresses.
|
|
|
|
|
|
|
|
|
|
| |
Cloud setups often have a never-changing setup and since every cycle counts,
they don't really want a management process running in the background after
network setup is complete. Since it's likely a VM, it's not like links
are going to go up/down very often.
Add a new "configure-quit=true/false" config option which, when set to true,
will quit NetworkManager after startup and initial configuration is complete.
|
|
|
|
|
|
|
|
|
| |
In case of a missing NetworkManager.conf (or a missing configuration option
main.plugins), allow to determine the fallback at compile time
https://bugzilla.gnome.org/show_bug.cgi?id=738611
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes NetworkManager independent of <polkit/polkit.h>
development headers and libpolkit-gobject-1.so library.
Instead communicate directly with polkit using its DBUS
interface.
PolicyKit support is now always compiled in. You can control
polkit authorization with the configuration option
[main]
auth-polkit=yes|no
If the configure option is omitted, a build time default
value is used. This default value can be set with the
configure option --enable-polkit.
This commit adds a new class NMAuthManager that reimplements the
relevant DBUS client parts. It takes source code from the polkit
library.
https://bugzilla.gnome.org/show_bug.cgi?id=734146
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
| |
Allow for the special values "1" and "0". Also, ignore the
letter case when comparing the configuration value.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have nm_utils_hwaddr_matches() for comparing addresses
(even when one is a string and the other binary), there are now places
where it's more convenient to store hardware addresses as strings
rather than binary, since we want them in string form for most
non-comparison purposes. So update for that.
In particular, this also changes nm_device_get_hw_address() to return
a string.
Also, simplify the update_permanent_hw_address() implementations by
assuming that they will only be called once. (Since they will.)
|
|
|
|
|
|
|
|
|
|
| |
Drop the arptype-based nm_utils_hwaddr funcs, and rename the
length-based ones to no longer have _len in their names. This also
switches nm_utils_hwaddr_atoba() to using a length rather than an
arptype, and adds a length argument to nm_utils_hwaddr_valid() (making
nm_utils_hwaddr_valid() now a replacement for nm_utils_hwaddr_aton()
in some places, where we were only using aton() to do validity
checking).
|
|
|
|
|
|
|
|
|
| |
Some subdirectories of src/ encapsulate large chunks of functionality,
but src/config/, src/logging/, and src/posix-signals/ are really only
separated out because they used to be built into separate
sub-libraries that were needed either for test programs, or to prevent
circular dependencies. Since this is no longer relevant, simplify
things by moving their files back into the main source directory.
|
|
|
|
|
| |
Also, remove the unused NMConfigError, and add a config-parsing test
program.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
0 means "turn off connectivity checking", so we can't use that to
determine whether or not the interval has already been set by
command-line options or not. Instead, store the interval
internally as a signed int and use -1 to mean "not yet set".
Second, validate input values for interval to ensure they can't
be less than 0 or more than G_MAXINT.
|
|
|
|
|
| |
If no config file was present, the Config object is returned empty
even if some options were passed via the command-line.
|
|
|
|
|
| |
More closely match the style of other objects in NM, where the
actual logic is nearer the top, and GObject stuff is near the bottom.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
g_malloc(), etc, never return NULL, by API contract. Likewise, by
extension, no other glib function ever returns NULL due to lack of
memory. So remove lots of unnecessary checks (the vast majority of
which would have immediately crashed had they ever run anyway, since
g_set_error(), g_warning(), and nm_log_*() all need to allocate
memory).
https://bugzilla.gnome.org/show_bug.cgi?id=693678
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use autoconf/automake variables for NetworkManager paths. Use
NetworkManager subdirectory where appropriate.
Files in /var/run (or /run on some distros) are moved into a separate
directory as is usual with other daemons. It makes the filesystem
more readable and file prefixing unnecessary.
/var/run/NetworkManager.pid -> /var/run/NetworkManager/NetworkManager.pid
/var/run/nm-dns-dnsmasq.pid -> /var/run/NetworkManager/dnsmasq.pid
/var/run/nm-dns-dnsmasq.conf -> /var/run/NetworkManager/dnsmasq.conf
The /var/run/NetworkManager directory is created at runtime, if it doesn't
exist.
Note: Path-based security policies like SELinux and AppArmor may need to
be adapted.
|
| |
|
|
|
|
|
|
|
|
| |
* use libsoup to compare a http response from a given
uri with a given response (use g_str_has_prefix () to compare)
* do periodically check the connectivity. Check interval is configurable
* check connectivity when device state change
from/to NM_DEVICE_STATE_ACTIVATED
|