Commit Graph

21088 Commits

Author SHA1 Message Date
Thomas Haller
753f39fa82 firewall: create firewall D-Bus proxy asynchronously
Creating it asynchronously changes that on the first call to
nm_firewall_manager_get() the instance is not yet running.

Note that NMPolicy already connects to the "STARTED" signal and
reapplies the zones when firewalld appears. So, this delayed
change of the running state is handled mostly fine already.

One part is still missing, it's to queue add_or_change/remove calls
while the firewall manager is initializing. That follows next.
2017-04-21 08:43:28 +02:00
Lubomir Rintel
258b863130 release: bump version to 1.7.91 (1.8-rc2) 2017-04-20 17:02:31 +02:00
Lubomir Rintel
b5d63b8005 release: update NEWS 2017-04-20 17:02:31 +02:00
Francesco Giudici
347016b584 nmcli: fix access to memeber nmc->show_secret
Cherry-picked commit from master which used the new
nmc->nmc_config member not available in nm-1-8.
We should use the nmc->show_secret member here.

Fixes: d4c8a3fbf2
2017-04-20 14:41:08 +02:00
Beniamino Galvani
104795317f merge: branch 'bg/cli-completion'
Fix autocompletion and other regressions in nmcli editor.
2017-04-20 14:35:07 +02:00
Beniamino Galvani
ed824102ff cli: fix completion of connection types
Return only main settings and the special slave types.
2017-04-20 14:34:20 +02:00
Beniamino Galvani
07cba18036 cli: accept special slave connection types in editor 2017-04-20 14:34:20 +02:00
Beniamino Galvani
032a3b4712 cli: only return main setting names as connection types
Also, return the special slave types.
2017-04-20 14:34:20 +02:00
Beniamino Galvani
243061edb6 cli: normalize function name 2017-04-20 14:34:20 +02:00
Beniamino Galvani
212df5cbd8 libnm: fix memory leak in DNS manager
Fixes: a8d6005256
2017-04-20 14:33:31 +02:00
Thomas Haller
030d77d3e1 device: merge branch 'th/device-assume-guess-rh1443878'
https://bugzilla.redhat.com/show_bug.cgi?id=1443878

(cherry picked from commit c828277872)
2017-04-20 14:29:18 +02:00
Thomas Haller
e3f4c492e8 device: assume matching connections during first start
Since commit 2d1b85f (th/assume-vs-unmanaged-bgo746440), we clearly
distinguish between two modes when encountering devices with external
IP configuration:
 a) external devices. For those devices we generate a volatile in-memory
   connection and pretend it's active. However, the device must not be
   touched by NetworkManager in any way.
 b) assume, seamless take over. Mostly for restart of NetworkManager,
   we activate a connection gracefully without going through an down-up
   cycle. After the device reaches activated state, the device is
   considered fully managed. For this only an existing, non volatile
   connection can be used.

Before 'th/assume-vs-unmanaged-bgo746440', the behaviors were not
clearly separated.

Since then, we only choose to assume a connection (b) when the state
file indicates a matching connection. Now, extend this to also assume
connections when:

  - during first-start (not after a restart) when there is no
    state file yet.
  - and, if we have an existing, non volatile, connection which
    matches the device's configuration.

This patch lets NetworkManager assume connection also on first start.
That is for example useful when handing over network configuration from
initrd.

This only applies to existing, permanent, matching(!) connections, so it is a
good guess that the user wants NM to take over this interface. This brings us
closer to the previous behavior before 'th/assume-vs-unmanaged-bgo746440'.

https://bugzilla.redhat.com/show_bug.cgi?id=1439220
(cherry picked from commit 27b2477cb7)
2017-04-20 14:29:00 +02:00
Thomas Haller
7fa7d57a83 config: add first_start paramter to NMConfig to detect restart
(cherry picked from commit 2131954a19)
2017-04-20 14:29:00 +02:00
Thomas Haller
cd92ee58a6 config: remove unused NMConfig self argument from nm_config_device_state_*() API
nm_config_device_state_*() always access the file system directly,
they don't cache data in NMConfig. Hence, they don't use the
@self argument.

Maybe those functions don't belong to nm-config.h, anyway. For lack
of a better place they are there.

(cherry picked from commit 1940be410c)
2017-04-20 14:29:00 +02:00
Thomas Haller
c828277872 device: merge branch 'th/device-assume-guess-rh1443878'
https://bugzilla.redhat.com/show_bug.cgi?id=1443878
2017-04-20 14:20:27 +02:00
Thomas Haller
27b2477cb7 device: assume matching connections during first start
Since commit 2d1b85f (th/assume-vs-unmanaged-bgo746440), we clearly
distinguish between two modes when encountering devices with external
IP configuration:
 a) external devices. For those devices we generate a volatile in-memory
   connection and pretend it's active. However, the device must not be
   touched by NetworkManager in any way.
 b) assume, seamless take over. Mostly for restart of NetworkManager,
   we activate a connection gracefully without going through an down-up
   cycle. After the device reaches activated state, the device is
   considered fully managed. For this only an existing, non volatile
   connection can be used.

Before 'th/assume-vs-unmanaged-bgo746440', the behaviors were not
clearly separated.

Since then, we only choose to assume a connection (b) when the state
file indicates a matching connection. Now, extend this to also assume
connections when:

  - during first-start (not after a restart) when there is no
    state file yet.
  - and, if we have an existing, non volatile, connection which
    matches the device's configuration.

This patch lets NetworkManager assume connection also on first start.
That is for example useful when handing over network configuration from
initrd.

This only applies to existing, permanent, matching(!) connections, so it is a
good guess that the user wants NM to take over this interface. This brings us
closer to the previous behavior before 'th/assume-vs-unmanaged-bgo746440'.

https://bugzilla.redhat.com/show_bug.cgi?id=1439220
2017-04-20 14:20:04 +02:00
Thomas Haller
2131954a19 config: add first_start paramter to NMConfig to detect restart 2017-04-20 14:19:56 +02:00
Thomas Haller
1940be410c config: remove unused NMConfig self argument from nm_config_device_state_*() API
nm_config_device_state_*() always access the file system directly,
they don't cache data in NMConfig. Hence, they don't use the
@self argument.

Maybe those functions don't belong to nm-config.h, anyway. For lack
of a better place they are there.
2017-04-20 14:19:56 +02:00
Francesco Giudici
d4c8a3fbf2 nmcli: show secrets when the --show-secrets option is put after the connection id
'nmcli connection show <con_id1> --show-secrets'
secrets were not shown.
'nmcli connection show <con_id1> --show-secrets <con_id2>'
secrets were shown only for connection ids following the
"--show-secrets" option (so only for 'con_id2').

Fix these behaviors showing secrets for all connections also
if the "--show-secrets" option is put after the connection ids.

(cherry picked from commit 4bdb6b026a)
2017-04-20 14:15:42 +02:00
Francesco Giudici
4bdb6b026a nmcli: show secrets when the --show-secrets option is put after the connection id
'nmcli connection show <con_id1> --show-secrets'
secrets were not shown.
'nmcli connection show <con_id1> --show-secrets <con_id2>'
secrets were shown only for connection ids following the
"--show-secrets" option (so only for 'con_id2').

Fix these behaviors showing secrets for all connections also
if the "--show-secrets" option is put after the connection ids.
2017-04-20 12:41:08 +02:00
Thomas Haller
6dfb3e9ffb cli/trivial: remove whitespace between N_ macro and parenthesis
For _() and N_() we don't have a space before the parenthesis.
Be consistent about that.
2017-04-19 18:27:19 +02:00
Piotr Drąg
fbf40a23ad po: update Polish (pl) translation (bgo #780277)
https://bugzilla.gnome.org/show_bug.cgi?id=780277

[thaller@redhat.com: with `make -C po NetworkManager.pot update-po`]
2017-04-19 17:33:37 +02:00
Piotr Drąg
b54c60c176 po: update Polish (pl) translation (bgo #780277)
https://bugzilla.gnome.org/show_bug.cgi?id=780277
2017-04-19 17:21:25 +02:00
Thomas Haller
e68b024fb6 po: make update-po 2017-04-19 14:48:54 +02:00
Piotr Drąg
a2f621265c po: update Polish (pl) translation (bgo #780277)
https://bugzilla.gnome.org/show_bug.cgi?id=780277
2017-04-19 14:48:07 +02:00
Thomas Haller
6207090e71 po: import Zanata translations 2017-04-19 14:46:54 +02:00
Thomas Haller
19626cabc9 po: make update-po 2017-04-19 12:10:38 +02:00
Thomas Haller
9b7c393246 po: fix project-version for nm-1-8 branch in zanata.xml 2017-04-19 11:53:31 +02:00
Thomas Haller
865205650b gitignore: ignore generated files from master branch 2017-04-19 11:53:31 +02:00
Thomas Haller
0f14c2bdcc gitignore: ignore .zanata-cache directory
(cherry picked from commit b4b8e81153)
2017-04-19 11:53:26 +02:00
Thomas Haller
4f5464a914 po: make update-po 2017-04-19 11:52:28 +02:00
Piotr Drąg
70eb4c3dba po: update Polish (pl) translation (bgo #780277)
https://bugzilla.gnome.org/show_bug.cgi?id=780277
2017-04-19 11:52:28 +02:00
Thomas Haller
ef6787364a po: import Zanata translations 2017-04-19 11:52:27 +02:00
Thomas Haller
ef25459377 po: make update-po 2017-04-19 11:52:26 +02:00
Thomas Haller
b4b8e81153 gitignore: ignore .zanata-cache directory 2017-04-19 11:52:26 +02:00
Beniamino Galvani
2bb62945a3 supplicant: fix detection of PMF support
Fixes: a72ffe230b
2017-04-19 10:36:21 +02:00
Thomas Haller
d105a610d6 device: use define for "sriov-num-vfs" config entry 2017-04-19 10:29:04 +02:00
Beniamino Galvani
3cabd60b96 merge: branch 'bg/sriov-numvfs-rh1398934'
https://bugzilla.redhat.com/show_bug.cgi?id=1398934
(cherry picked from commit 45e4cc67b3)
2017-04-19 08:50:48 +02:00
Beniamino Galvani
5413d3bcc7 device: re-apply sriov_numvfs after SIGHUP
(cherry picked from commit 264624f91d)
2017-04-19 08:49:37 +02:00
Beniamino Galvani
0c2576e4bf core: allow setting SR-IOV num_vfs
(cherry picked from commit 32975b6aa5)
2017-04-19 08:49:37 +02:00
Beniamino Galvani
2409de0bb1 all: detect SR-IOV device support
(cherry picked from commit f13fd4524c)
2017-04-19 08:49:37 +02:00
Beniamino Galvani
2511e27e76 platform: detect SR-IOV support and allow changing the number of VFs
(cherry picked from commit 0a7694cf81)
2017-04-18 23:28:59 +02:00
Beniamino Galvani
45e4cc67b3 merge: branch 'bg/sriov-numvfs-rh1398934'
https://bugzilla.redhat.com/show_bug.cgi?id=1398934
2017-04-18 23:25:30 +02:00
Beniamino Galvani
264624f91d device: re-apply sriov_numvfs after SIGHUP 2017-04-18 23:10:36 +02:00
Beniamino Galvani
32975b6aa5 core: allow setting SR-IOV num_vfs 2017-04-18 23:10:36 +02:00
Beniamino Galvani
f13fd4524c all: detect SR-IOV device support 2017-04-18 22:48:34 +02:00
Beniamino Galvani
0a7694cf81 platform: detect SR-IOV support and allow changing the number of VFs 2017-04-18 22:47:32 +02:00
Thomas Haller
785b51ed02 device: leave device up when setting it as unmanaged by user
Before, setting a device to unmanaged causes it to go down and clear
the interface state.

It may be useful to instruct NetworkManager not to touch the device
anymore but leave the current state up. Changing behavior for

  nmcli device set "$DEV" managed no

To get the previous behavior, one has to first disconnect the interface
via

  nmcli device disconnect "$DEV"
  nmcli device set "$DEV" managed no

Note that non-permanent addresses like from DHCP will eventually time
out because NetworkManager stops the DHCP client. When instructing
NetworkManager to let go of the device, you have to take it over in
any way you see fit.

https://bugzilla.redhat.com/show_bug.cgi?id=1371433
(cherry picked from commit 9e8218f99a)
2017-04-18 21:48:01 +02:00
Thomas Haller
6d3ce7557e core: merge branch 'th/netns-singleton-rh1440089'
https://bugzilla.redhat.com/show_bug.cgi?id=1440089

(cherry picked from commit a31ddcfca5)
2017-04-18 15:53:28 +02:00
Thomas Haller
c2297fb66c core: enable "log-with-ptr" by default for platform and route-manager
Arguably, we currently only have one instance of NMPlatform,
NMRouteManager, NMDefaultRouteManager -- the one owned by the
NMNetns singleton.

Hence, all these instances we create with "log-with-ptr" set explicitly
to false.

In the future we want to support namespaces, and it will be be common to
have multiple instances. For that we have "log-with-ptr" so we are able
to disambiguiate the logging.

Change the default to TRUE because it makes more sense. It has currently
no effect as the default is never used.

(cherry picked from commit 41148caba8)
2017-04-18 15:53:11 +02:00