Commit Graph

439 Commits

Author SHA1 Message Date
Beniamino Galvani
89d1e46615 dhcp/systemd: enable DHCPv6 support
Until now the internal DHCP client could start a DHCPv6 transaction
but was not able to parse the lease and pass the information back to
the core. Add the missing glue code to make this work.

https://bugzilla.gnome.org/show_bug.cgi?id=762432
2016-03-03 11:29:27 +01:00
Thomas Haller
24582b65e1 logging: change logging format to drop "[file:line] func():" part
Choose a new logging format.

- the logging format must not be configurable and it must be the
  same for all backends. It is neat that journal supports additional
  fields, but an average user still posts the output of plain
  journalctl, without "--output verbose" (which would also be hard
  to read).
  Also, we get used to a certain logging format, so having different
  formats is confusing. If one format is better then another, it should
  be used for all backends: syslog, journal and debug.
  The only question is, what is the best format.

- the timestamp: I find it useful to see how much time between two
  events passed. The timestamp printed by syslog doesn't have sufficient
  granularity, and the internal journal fields are not readily available.
  We used to print the timestamps for <error>, <debug> and <trace>,
  but ommited them for <info> and <warn> levels. We now print them for
  all levels, which has a uniform alignment.

- the location: the "[file:line] func():" part is mostly redundant
  and results in wide lines. It also causes a misalignment of the
  logging lines, or -- as I recently added alignment of the location --
  it results in awkward whitespace and truncation.
  But the location is really just necessary because our logging messages
  are bad:
    "<debug> [1456397604.038226] (9) 11-dhclient succeeded"
  The solution to this is not
    "<debug> [1456397604.038226] [nm-dispatcher.c:358] dispatcher_results_process(): (9) 11-dhclient succeeded"
  but a properly worded message:
    "<debug> [1456397604.038226] dispatcher: request #9, script 11-dhclient succeeded"

- logging-message: we need to write better logging messages.
  I like some form of "tags" that are easy to grep:
    "platform: signal: link changed: 4: ..."
  Downside is, that this is not nice to read as a full sentence.
  So, especially for <info> and <warn> logging, more human readable
  messages are better.
  We should find a compromise, where the log message explains what
  happens, but is still concise and contains patterns that are easy
  to grep and identify visually.

https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00077.html
2016-03-01 15:20:57 +01:00
Thomas Haller
b875ac34be man: clarify DEVICE_IFACE vs. DEVICE_IP_IFACE in man NetworkManager 2016-02-22 20:08:56 +01:00
Beniamino Galvani
10b222288e wifi: don't touch by default current powersave setting
Some drivers (or things outside NM like 'powertop') may turn powersave
on, so don't touch it unless explicitly configured by user.

To achieve this, add new 'default' and 'ignore' options; the former
can be used to fall back to a globally configured setting, while the
latter tells NM not to touch the current setting.

When 'default' is specified, a missing global default configuration is
equivalent to 'ignore'.

It is possible to enable Wi-Fi power saving for all connections by
dropping a file in /etc/NetworkManager/conf.d with the following
content:

 [connection]
 wifi.powersave=3

https://bugzilla.gnome.org/show_bug.cgi?id=760125
2016-02-16 00:18:06 +01:00
Beniamino Galvani
efa5cee6d0 man: fix nesting of tags in NetworkManager.conf man page
Fixes: 9f1e9913b9
2016-02-11 17:21:36 +01:00
Thomas Haller
0cccb7b723 man: reorder and rework CONNECTION SECTION in NetworkManager.conf's manual 2016-01-27 13:48:09 +01:00
Thomas Haller
de97003641 man: fix indention of program listings in NetworkManager.conf 2016-01-27 13:14:53 +01:00
Thomas Haller
b51da9b030 man: replace tabs by eight spaces in xml manual pages 2016-01-27 13:12:49 +01:00
Thomas Haller
4eda14451b man: fix typo in NetworkManager.conf 2016-01-27 12:32:07 +01:00
Michael Biebl
b72cdb75d8 build: install nm-settings-ifcfg-rh.5 man page conditionally
Only install nm-settings-ifcfg-rh.5 man page if the ifcfg-rh
configuration plugin has been enabled.

But still add them to EXTRA_DIST so that the source tarball
contains the generated man-file, but it isn't installed.

https://bugzilla.gnome.org/show_bug.cgi?id=759823
2016-01-23 16:47:03 +01:00
Beniamino Galvani
28f6e8b4d2 device: detect duplicate IPv4 addresses when method=manual 2016-01-20 11:53:47 +01:00
Beniamino Galvani
9bc5600aa4 man: document the effects of supported signals 2016-01-19 11:48:49 +01:00
Lubomir Rintel
fa6375cd8b cli: add nmcli d reapply
Client support for O.FD.NM.Device.Reapply().
2016-01-10 23:13:34 +01:00
Beniamino Galvani
2ef3c1047d man: fix typos 2015-12-24 09:48:20 +01:00
Jiří Klimeš
016db38ce2 cli: use '|' instead of ',' for delimiting the modes
to be consistent with other options
2015-12-17 16:20:10 +01:00
Beniamino Galvani
36f055fad9 cli: document ip-tunnel connection type 2015-12-16 14:03:28 +01:00
Beniamino Galvani
7da440b798 cli: add vxlan support 2015-12-09 16:36:46 +01:00
Beniamino Galvani
c3e6e25239 cli: add macvlan support 2015-12-09 14:30:08 +01:00
Thomas Haller
783b3642d0 man: correct manual page with respect to whitespace in device-spec 2015-12-09 14:08:43 +01:00
Jiří Klimeš
629de4e689 cli: add global --show-secrets option
- it controls echoing passwords input on terminal
- it replaces --show-secrets in 'nmcli connection show', which is deprecated now
- it replaces --show-password in 'nmcli device wifi hotspot', which is deprecated now
2015-12-07 14:14:58 +01:00
Jiří Klimeš
9f2326dff0 man: rephrase a sentence in nmcli man page
for 'nmcli connection clone'
2015-12-07 12:22:45 +01:00
Jiří Klimeš
3892b839af cli: add 'nmcli connection export' (rh #1034105)
Synopsis:
  nmcli connection export [ id | uuid | path] <ID> [<output file>]

for exporting VPN connections.

https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:20 +01:00
Jiří Klimeš
9a0e4bae47 cli: add 'nmcli connection import' (rh #1034105)
Synopsis:
  nmcli connection import [--temporary] type <type> file <file to import>

Only VPN configurations can be imported at the moment.

https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:06 +01:00
Lubomir Rintel
d03f347b9d cli: add nmcli monitor
https://bugzilla.redhat.com/show_bug.cgi?id=1034158
2015-12-05 12:16:23 +01:00
Lubomir Rintel
e92e06bdc7 cli,connections: add connection monitor 2015-12-05 12:16:06 +01:00
Lubomir Rintel
9b49284f0c cli,devices: add device monitor 2015-12-05 12:16:04 +01:00
Jiří Klimeš
4eab8191eb man: add missing description of tun parameters in nmcli manual page
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Lubomir Rintel
b1076a698c build: re-add NetworkManager.conf.xml.in to dist
Fixes: 90683fcb3a
2015-11-28 17:26:33 +01:00
Lubomir Rintel
90683fcb3a build: substitute config directory in Makefile
The autoconf substitutions should be expanded in Makefiles and shell scripts
only, does not work well in XML.

Fixes: 3e0b590e10
2015-11-27 14:18:34 +01:00
Jiří Klimeš
4a06701e88 cli: add 'strongswan' and 'fortisslvpn' to known VPN types 2015-11-25 17:14:02 +01:00
Thomas Haller
e1ea4b725e main: add argument --print-config to NetworkManager 2015-11-22 13:40:32 +01:00
Thomas Haller
98e4194963 wifi: disable mac-address-randomization by default
Enabling it by default can be bad. For example for captive portals.
Effectively revert commit 4f6c91d696
to again disable it by default.

https://bugzilla.gnome.org/show_bug.cgi?id=734081
2015-11-18 17:54:11 +01:00
Thomas Haller
f4c7a9d426 man: fix documentation of for default value wifi.mac-address-randomization
Fixes: 4f6c91d696
2015-11-18 17:10:41 +01:00
Dan Williams
190e0e31cd wifi: implement MAC address randomization
If the supplicant supports it and the connection requests it, tell
the supplicant to randomize the MAC address for the association.

In addition, like both iOS, Android, and other OSs always randomize
the MAC address when performing a WiFi scan.
2015-11-18 15:37:42 +01:00
Jiří Klimeš
0c65b28960 cli: add 'nmcli connection clone' for cloning connections (bgo #757627)
Synopsis:
nmcli connection clone [--temporary] [id|uuid|path] <ID> <new name>

It copies the <ID> connection as <new name>. The command is very useful
if there is a connection, but another one is needed for a related
configuration. One can copy the existing profile and modify it for the
new situation.

For example:
$ nmcli con clone main-eth second-eth
$ nmcli con modify second-eth connection.interface-name em4

https://bugzilla.gnome.org/show_bug.cgi?id=757627
2015-11-18 09:37:44 +01:00
Beniamino Galvani
5b3137984d cli: add command for displaying LLDP neighbors
The list of LLDP neighbors is available through the D-Bus interface
and libnm already provides functions to retrieve it; make the list
available through nmcli as well. Sample output:

  $ nmcli device lldp
  NEIGHBOR[0].DEVICE:                     eth0
  NEIGHBOR[0].CHASSIS-ID:                 00:13:21:58:CA:42
  NEIGHBOR[0].PORT-ID:                    1
  NEIGHBOR[0].PORT-DESCRIPTION:           1
  NEIGHBOR[0].SYSTEM-NAME:                ProCurve Switch 2600-8-PWR
  NEIGHBOR[0].SYSTEM-DESCRIPTION:         ProCurve J8762A Switch 2600-8-PWR, revision H.08.89
  NEIGHBOR[0].SYSTEM-CAPABILITIES:        20 (mac-bridge,router)
  NEIGHBOR[1].DEVICE:                     eth2
  NEIGHBOR[1].CHASSIS-ID:                 00:01:30:F8:AD:A2
  NEIGHBOR[1].PORT-ID:                    1/1
  NEIGHBOR[1].PORT-DESCRIPTION:           Summit300-48-Port 1001
  NEIGHBOR[1].SYSTEM-NAME:                Summit300-48
  NEIGHBOR[1].SYSTEM-DESCRIPTION:         Summit300-48 - Version 7.4e.1 (Build 5)
  NEIGHBOR[1].SYSTEM-CAPABILITIES:        20 (mac-bridge,router)

https://bugzilla.gnome.org/show_bug.cgi?id=757307
2015-11-10 14:06:02 +01:00
Jiří Klimeš
fe5927ae48 nmcli: add a hotspot example to nmcli manual page 2015-11-10 09:15:41 +01:00
Jiří Klimeš
2f52a10be1 cli: add '--show-password' option for 'nmcli device wifi hotspot'
It is useful to show nmcli-generated hotspot password (if a user does not
provide his own password). Without the option the user would have to look into
the generated profile in order to find out the password.
2015-11-10 09:15:06 +01:00
Jiří Klimeš
781d24f1dd cli: add 'password' option for 'nmcli device wifi hotspot'
It allows user provided password to be used to secure the hotspot.
Otherwise, nmcli will generate a suitable password.
2015-11-10 09:10:48 +01:00
Jiří Klimeš
d6427d7198 cli: add 'nmcli device wifi hotspot' command
Synopsis:
nmcli device wifi hotspot [ifname <ifname>] [con-name <name>] [ssid <SSID>]
                          [band a|bg] [channel <channel>]
2015-11-10 09:08:05 +01:00
Adam Bk
cfa4195e0c man: fix synopsis for nmcli connection up (bgo #757777)
'passwd' -> 'passwd-file'

https://bugzilla.gnome.org/show_bug.cgi?id=757777
2015-11-09 15:52:25 +01:00
Beniamino Galvani
c24c5895f3 man: fix indentation in nmcli manual page
Fixes: 721e917cb6
2015-10-29 14:00:32 +01:00
Thomas Haller
2144457fab keyfile: make the keyfile location configurable
https://bugzilla.gnome.org/show_bug.cgi?id=755995
2015-10-14 20:23:38 +02:00
Beniamino Galvani
9184418b2e device: introduce a global default value for ipv4.dhcp-timeout
This allows the ipv4.dhcp-timeout default value to be set from user
configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=756423
2015-10-13 09:37:34 +02:00
Beniamino Galvani
c364ef0b97 libnm: add 'lldp' property to NMSettingConnection
Add the 'lldp' property to NMSettingConnection, which specifies
whether the reception and parsing of LLDP frames to discover neighbor
devices should be enabled.
2015-10-12 14:44:19 +02:00
Thomas Haller
da0ded4927 config: drop global-dns.enable option in favor of .config.enable
No longer support disabling the global-dns configuration via the
"enable" option.

Instead, the user can put the entire dns-configuration in one separate
snippet, and disable it altogether with ".config.enable".
2015-10-05 17:12:50 +02:00
Thomas Haller
7182304684 config: allow to enable/disable configuration snippets
Support a new configuration option

  [.config]
  enable=<ENABLED>

for configuration snippets.

This new [.config] section is only relevant within the snippet itself
and it is not merged into the combined configuration.

Currently only the "enable" key is supported. If the "enable" key is
missing, it obviously defaults to being enabled. It allows snippets
to be skipped from loading. The main configuration "NetworkManager.conf"
cannot be skipped.

<ENABLED> can be a boolean value (false), to skip a configuration
snippet from loading.
It can also be a string to match against the NetworkManager version,
like "enable=nm-version-min:1.1,nm-version-min:1.0.6"

There are several motivations for this:

- the user can disable an entire configuration snippet by toggeling
  one entry.
  This generalizes  the functionality of the global-dns.enable
  setting, but in a way that applies to configuration on a per-file
  basis.

- for developing, we often switch between different versions of
  NetworkManager. Thus, we might want to use different configuration.
  E.g. before global-dns options, I want to use "dns=none" and manage
  resolv.conf myself. Now, I can use global-dns setting to do that.
  That can be achieved with something like the following (not exactly,
  it's an example only):

      [.config]
      enable=nm-version-min:1.1
      [main]
      dns=default
      [global-dns-domain-*]
      nameserver=127.0.0.1

  Arguably, this would be more awesome, if we would bump our micro devel
  version (1.1.0) more often while developing 1.2.0 (*hint*).

- in principle, packages could drop configuration snippets and enable
  them based on the NetworkManager version.

- with the "env:" spec, you can enable/disable snippets by configuring
  an environment variable. Again, useful for testing and developing.
2015-10-05 17:12:50 +02:00
Beniamino Galvani
dd6fbe7bfa man: document global DNS configuration sections 2015-10-01 09:05:08 +02:00
Jiří Klimeš
66b7e45708 man: fix in nm-settings-ifcfg-rh description 2015-09-25 13:23:44 +02:00
Jiří Klimeš
9f1e9913b9 man: document that vpn.timeout property supports a default value 2015-09-21 16:59:04 +02:00