Commit Graph

513 Commits

Author SHA1 Message Date
Benjamin Porter
f6e41c19ff man: extents -> extends in man page
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/497
2020-05-08 08:06:33 +02:00
Beniamino Galvani
2035353dab man: initrd: describe differences from network-legacy module 2020-05-06 10:33:42 +02:00
Beniamino Galvani
fbf54ab182 initrd: parse 'rd.net.timeout.dhcp' option 2020-05-06 10:32:25 +02:00
Beniamino Galvani
f14cc584d5 initrd: add command line option to specify initrd data directory 2020-05-06 10:32:25 +02:00
Thomas Haller
0b168f7b99 dispatcher: clarify documentation about first argument to dispatcher scripts for "connectivity-change"
The manual page claimed that for "connectivitiy-change" actions, the dispatcher
scripts would get as first argument (the device name) "none". That was not done,
only for "hostname" actions.

For consistency, maybe that should be adjusted to also pass "none" for connectivity
change events. However, "none" is really an odd value, if there is no device. Passing
an empty word is IMO nicer. So stick to that behavior, despite being inconsistent.
Also fix the documentation about that.
2020-04-30 21:50:28 +02:00
Thomas Haller
e468b48ab7 nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environment
https://bugzilla.redhat.com/show_bug.cgi?id=1828458

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/484
2020-04-30 21:46:59 +02:00
Thomas Haller
9b295f0df5 dhcp: make connection.mud-url configurable as global connection default
Conceptionally, the MUD URL really depends on the device, and not so
much the connection profile. That is, when you have a specific IoT
device, then this device probably should use the same MUD URL for all
profiles (at least by default).

We already have a mechanism for that: global connection defaults. Use
that. This allows a vendor drop pre-install a file
"/usr/lib/NetworkManager/conf.d/10-mud-url.conf" with

  [connection-10-mud-url]
  connection.mud-url=https://example.com

Note that we introduce the special "connection.mud-url" value "none", to
indicate not to use a MUD URL (but also not to consult the global connection
default).
2020-04-28 13:01:18 +02:00
Beniamino Galvani
25583de20b man: mention the meaning of may-fail in the nm-online man page
Commit b2a0738765 ('man: improve manual page for nm-online') removed
the explanation of how may-fail can be used to wait for a specific
address family during boot. I found that part useful. Add it again,
adapting it to the new behavior introduced by 1e5206414a ('device:
don't delay startup complete for pending-actions "autoconf", "dhcp4"
and "dhcp6"').

https://bugzilla.redhat.com/show_bug.cgi?id=1825666
2020-04-23 17:31:11 +02:00
Thomas Haller
2f20878dbf man: fix obsolete references to monitor-connection-files in manual pages
monitor-connection-files was deprecated and disabled by default for a long
time. In the meantime, it has no effect at all.

Remove references from the manual pages.
2020-04-10 15:02:20 +02:00
Thomas Haller
3477d764d3 man: clarify description of keyfiles in man nm-settings-keyfile
Before:

  It writes files out in a .ini-style format in
  /etc/NetworkManager/system-connections/.
  ...
  For security, it will ignore files that are readable or
  writable by any user or group other than 'root' since private
  keys...

After:

  The files are in a .ini-style format and located in
  /etc/NetworkManager/system-connections/,
  /usr/lib/NetworkManager/system-connections/ and
  /run/NetworkManager/system-connections/.
  ...
  For security, it will ignore files that are readable or
  writable by any user other than 'root' since private keys...

https://bugzilla.redhat.com/show_bug.cgi?id=1819259
2020-04-01 16:01:55 +02:00
Thomas Haller
46dd4d0fbf meson: merge branch 'inigomartinez/meson-license'
Add SPDX license headers for meson files.

As far as I can tell, according to RELICENSE.md file, almost everybody
who contributed to the meson files agreed to the LGPL-2.1+ licensing.
This entails the vast majority of code in question.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/397
2020-03-28 12:45:19 +01:00
Beniamino Galvani
2334a27692 cli: support setting removal 2020-03-23 11:42:57 +01:00
Thomas Haller
b2a0738765 man: improve manual page for nm-online
https://bugzilla.redhat.com/show_bug.cgi?id=1706646
2020-03-17 13:33:51 +01:00
Thomas Haller
a8442c8243 man: show example for nmcli --ask device wifi connect in nmcli-example manual 2020-03-06 09:48:58 +01:00
Auke Kok
425293b13c man: show example for nmcli device wifi connect in nmcli-example manual
Add the only important example that this file should have

All other examples are nice. But when you install a console-only
machine and read the NM man pages, you are none the wiser, because
something as simple like this isn't covered in the man pages.

I've seen other users complain about it, and I've torn my hair out
over this several times.

[thaller@redhat.com: changed subject line of patch]
2020-03-06 09:48:58 +01:00
Thomas Haller
9dde86d02c ndisc: implement "ipv6.ra-timeout" property 2020-02-17 14:43:13 +01:00
Iñigo Martínez
648155e4a1 license: Add license using SPDX identifiers to meson build files
License is missing in meson build files. This has been added using
SPDX identifiers and licensed under LGPL-2.1+.
2020-02-17 13:16:57 +01:00
Antonio Cardace
1ccdce0c1d man: fix missing tag 2020-01-29 17:32:47 +01:00
Antonio Cardace
7ef684b1b3 man: add dnsmasq option documentation on added dns servers 2020-01-29 17:25:21 +01:00
Thomas Haller
655e1aa97f man: document connectivity.enabled option in NetworkManager.conf manual 2019-12-28 15:20:06 +01:00
Thomas Haller
6d7446e52f core: add main.auth-polkit option "root-only"
We always build with PolicyKit support enabled, because it has no
additional dependencies, beside some D-Bus calls.

However, in NetworkManager.conf the user could configure
"main.auth-polkit" to disable PolicyKit. However, previously it would
only allow to disable PolicyKit while granting access to all users.

I think it's useful to have an option that disables PolicyKit and grants
access only to root. I think we should not go too far in implementing
our own authorization mechanisms beside PolicyKit (e.g. you cannot
disable PolicyKit and grant access based on group membership of the
user). However, disabling PolicyKit can be useful sometimes, and it's
simple to implement a "root-only" setup.

Note one change is that when NetworkManager now runs without a D-Bus
connection (in initrd), it would deny all non-root requests. Previously
it would grant access. I think there should be little difference in
practice, because if we have no D-Bus we also don't have any requests to
authenticate.
2019-12-11 11:52:05 +01:00
Thomas Haller
3d07708f59 doc: clarify default values for ipv4.mdns and ipv4.llmnr settings
LLMNR and mDNS settings can have their global default value configured
in "NetworkManager.conf".

Global default values should work the way that all regular values of the property
can be configured explicitly in the connection profile. The special "default" value
only indicates to allow lookup of the global default, but it should not have a
meaning of its own.

Note that if mDNS/LLMNR settings are left unspecified, we will set the
argument to SetLinkMulticastDNS() and SetLinkLLMNR() functions to "",
which means that systemd-resolved decides on a default. Also, depending
on the DNS plugin, the default value differs. This is all fine however.
In this case, the ultimate default value depends on other things (like
the DNS plugin), but each possible value is in fact explicitly
configurable. We also do that for "ipv6.ip6-privacy".

Anyway, cleanup the documentation a bit and try to better explain what
the default is.
2019-12-10 16:49:23 +01:00
Beniamino Galvani
316ff68bfa dhcp: support FQDN flags in the dhclient backend
Make the dhclient backend honor the ipv4.dhcp-fqdn-flags setting.
2019-11-28 17:56:35 +01:00
Thomas Haller
6d7270e222 build/meson: cleanup configuration_data() for paths
We don't need such data duplicated. The build setup should
have only one configuration_data() for patching such values.

Now we only have one global, immutable data_conf dictionary with
configuration values. Note that none of the users of data_conf uses all
entries, but as the entries are basically only dependent on the
meson/configure option and valid for the entire project, this simplifies
to handling.
2019-11-22 15:59:31 +01:00
Beniamino Galvani
6f16e524be core: support ipvX.dhcp-iaid properties 2019-11-11 10:31:36 +01:00
Lubomir Rintel
7061341a41 cli: add "nmcli d wifi show"
A quick overview of the currently connected Wi-Fi network, including
credentials. Comes handy if someone wants to connect more devices to
their Hotspot or the same network as they are connected to.
2019-10-18 17:38:57 +02:00
Thomas Haller
597e4b2d1e cli: honor NO_COLOR environment variable to prevent automatic ASCII colors
See-also: https://no-color.org/
2019-10-08 12:18:20 +02:00
Iñigo Martínez
bfbcf8f3fe meson: Use generators placeholders
Functions derived from generators as `configure_file`,
`custom_target` and `i18n.merge_file` can use placeholders like
`@BASENAME@` that removes the extension from the input filename
string.

The output string has been replaced by this placeholder that
allows in some cases the use of less variables.
2019-10-01 09:49:33 +02:00
Thomas Haller
a5bc4cb785 man: add examples how to configure bluetooth devices to man nmcli-examples. 2019-09-22 16:05:50 +02:00
Lubomir Rintel
25fadf8f92 cli: add kill switch indication to "nmcli" output
There is some guess work done on the client side. Perhaps the
o.fd.NM.Device could be extended to indicate which kill switch is the
device disabled by. This could be good enough for now though.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/271/commits
2019-09-20 12:49:21 +02:00
Thomas Haller
cec39d76bd man/cli: better explain modifying properties regarding +/- modifiers 2019-08-16 08:16:02 +02:00
Francesco Giudici
7dd95221b7 man: update nm-openswitch example
Seems that a quite common openswitch basic configuration consist of a
one bridge, one port and one interface, all with the same interface
name. When performing such configuration in NetworkManager you need to
specify the slave-type for the ovs-interface, otherwise the master
interface specified there may match the bridge interface, resulting in
an error.
So, let's specify the slave-type for the ovs-interface, so that the
example will work also when the same interface name is specified for
both the ovs-bridge and the ovs-port.

https://bugzilla.redhat.com/show_bug.cgi?id=1638038
2019-07-09 12:05:32 +02:00
Thomas Haller
74641be816 settings: drop ibft settings plugin
The functionality of the ibft settings plugin is now handled by
nm-initrd-generator. There is no need for it anymore, drop it.

Note that ibft called iscsiadm, which requires CAP_SYS_ADMIN to work
([1]). We really want to drop this capability, so the current solution
of a settings plugin (as it is implemented) is wrong. The solution
instead is nm-initrd-generator.

Also, on Fedora the ibft was disabled and probably on most other
distributions as well. This was only used on RHEL.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1371201#c7
2019-06-20 16:06:44 +02:00
Thomas Haller
a530921f40 man: update reference for reporting bugs in man nmcli
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/188
2019-06-11 13:26:19 +02:00
Thomas Haller
1ae5e6465f settings: drop deprecated NetworkManager.conf option "main.monitor-connection-files"
It's deprecated and off by default for a long time.

It is bad to automatically reload connection profiles. For example, ifcfg
files may consist of multiple files, there is no guarantee that we
pick up the connection when it's fully written.

Just don't do this anymore.

Users should use D-Bus API or `nmcli connection reload` or `nmcli
connection load $FILENAME` to reload profiles from disk.
2019-05-28 17:51:24 +02:00
Jonas DOREL
13be449296 doc: replace "Split DNS" with "Conditional Forwarding"
Split DNS usually refers to "Split Horizon DNS" whereas "Conditional
Forwarding" is specifically for what the documentation describes.

[thaller@redhat.com: rewrote commit message]

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/143
2019-05-17 12:08:45 +02:00
Thomas Haller
89d40d6579 wireguard: add "mtu" setting for WireGuard profiles
This adds new API for 1.16.0 and is an ABI break since 1.16-rc1.

(cherry picked from commit d5e93ae613)
2019-03-05 12:23:59 +01:00
Thomas Haller
4023012cd1 man: add a warning to NetworkManager.conf manual for rp_filter and connectivity checking 2019-02-08 16:05:36 +01:00
Thomas Haller
ce2f3d8c1e man: explain purpose of connectivity checking in man NetworkManager.conf 2019-02-05 11:12:07 +01:00
Lubomir Rintel
58ee6be348 man: fix a typo 2019-02-05 10:20:27 +01:00
Thomas Haller
930c7d2d22 man: better explain "connectivity.response" in "NetworkManager.conf" manual 2019-01-31 11:33:45 +01:00
Thomas Haller
7807ffff83 connectivity: fix handling of no-response for captive portal detection
Since we only compare that the HTTP response starts with the expected
response, we need to handle the empty expected response specially
(because, every response has "" as prefix).

So now if connectivity.response is set to "" (empty) we accept:

- HTTP status code 204. We ignore and accept any extra data that we
  might receive.

- HTTP status code 200 and an empty (or no) body.
2019-01-31 11:33:44 +01:00
Rafael Fontenelle
d81e10942f all: fix misspellings
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/64
2019-01-24 17:19:44 +01:00
Lubomir Rintel
96782b94e1 merge: branch 'master' of https://github.com/balrog-kun/NetworkManager
https://github.com/NetworkManager/NetworkManager/pull/137
2019-01-04 18:26:41 +01:00
Iñigo Martínez
35171b3c3f build: meson: Add trailing commas
Add missing trailing commas that avoids getting noise when another
file/parameter is added and eases reviewing changes[0].

[0] https://gitlab.gnome.org/GNOME/dconf/merge_requests/11#note_291585
2018-12-20 13:50:34 +01:00
Beniamino Galvani
f606124b62 man: add SR-IOV nmcli example
Add an example on how to configure SR-IOV to the nmcli examples man
page.

https://bugzilla.redhat.com/show_bug.cgi?id=1651979
2018-12-12 14:38:18 +01:00
Thomas Haller
a7ef23b326 core: fix match spec behavior for a list of all "except:"
If the spec specifies only negative matches (and none of them matches),
then the result shall be positive.

Meaning:

    [connection*] match-device=except:dhcp-plugin:dhclient
    [connection*] match-device=except:interface-name:eth0
    [.config] enabled=except:nm-version:1.14

should be the same as:

    [connection*] match-device=*,except:dhcp-plugin:dhclient
    [connection*] match-device=*,except:interface-name:eth0
    [.config] enabled=*,except:nm-version:1.14

and match by default. Previously, such specs would never yield a
positive match, which seems wrong.

Note that "except:" already has a special meaning. It is not merely
"not:". That is because we don't support "and:" nor grouping, but all
matches are combined by an implicit "or:". With such a meaning, having
a "not:" would be unclear to define. Instead it is defined that any
"except:" match always wins and makes the entire condition to explicitly
not match. As such, it makes sense to treat a match that only consists
of "except:" matches special.

This is a change in behavior, but the alternative meaning makes
little sense.
2018-12-11 13:58:24 +01:00
Thomas Haller
c7d8864511 connectivity: honor "main.systemd-resolved" setting to not resolve names first
If the user disabled systemd-resolved, two things seem apparent:

 - the user does not want us to use systemd-resolved

 - NetworkManager is not pushing the DNS configuration to
   systemd-resoved.

It seems to me, we should not consult systemd-resolved in that case.
2018-12-11 09:23:47 +01:00
Andrew Zaborowski
3593237527 cli: reuse connections in nmcli dev wifi con
Try to locate an existing connection before creating a new one when
handling "nmcli device wifi connect".  This allows WPA-Enterprise
networks to be activated this way, consistent with the comment that this
command is equivalent to clicking on an SSID in a GUI client.
2018-12-04 14:46:37 +01:00
Beniamino Galvani
446e5b27d6 core: add checks on connection default properties
Add a new CON_DEFAULT() macro that places a property name into a
special section used at runtime to check whether it is a supported
connection default.

Unfortunately, this mechanism doesn't work for plugins so we have to
enumerate the connection defaults from plugins in the daemon using
another CON_DEFAULT_NOP() macro.
2018-12-01 15:16:48 +01:00