Thomas Haller
af195e1178
device: unify IPv4 and IPv6 device methods for IP configs
...
It is preferable to treat IPv4 and IPv6 in a similar manner.
This moves the places where we differ down the call-stack.
It also make it clearer how IPv6 behaves differently. I think this
is a bug, but leave it for now.
+ /* If IP had previously failed, move it back to IP_CONF since we
+ * clearly now have configuration.
+ */
+ if (priv->ip6_state == IP_FAIL)
+ _set_ip_state (self, AF_INET6, IP_CONF);
(cherry picked from commit 1585eaf473 )
2019-03-05 12:23:59 +01:00
Thomas Haller
186c5b7a65
core: use nm_connection_get_setting_ip_config() helper
...
(cherry picked from commit 2be022ad68 )
2019-03-05 12:23:59 +01:00
Thomas Haller
f58fa6e125
libnm-core: add nm_connection_get_setting_ip_config() helper
...
(cherry picked from commit 02964c22a6 )
2019-03-05 12:23:59 +01:00
Thomas Haller
dbfe592272
core: accept %NULL as source argument for nm_utils_ipx_address_clear_host_address()
...
Just for convenience.
(cherry picked from commit be107c75c9 )
2019-03-05 12:23:59 +01:00
Thomas Haller
a79d9dacf1
build: fix build dependency for generating libnm enum headers before building nm-online
...
CC clients/nm_online-nm-online.o
In file included from ./shared/nm-default.h:311:0,
from clients/nm-online.c:34:
./libnm/NetworkManager.h:60:10: fatal error: nm-enum-types.h: No such file or directory
#include "nm-enum-types.h"
^~~~~~~~~~~~~~~~~
(cherry picked from commit d8070c7a14 )
2019-03-05 10:25:54 +01:00
Thomas Haller
d8070c7a14
build: fix build dependency for generating libnm enum headers before building nm-online
...
CC clients/nm_online-nm-online.o
In file included from ./shared/nm-default.h:311:0,
from clients/nm-online.c:34:
./libnm/NetworkManager.h:60:10: fatal error: nm-enum-types.h: No such file or directory
#include "nm-enum-types.h"
^~~~~~~~~~~~~~~~~
2019-03-05 10:18:42 +01:00
Thomas Haller
9b56d760af
core,wireguard: merge branch 'th/wireguard-routes'
...
https://github.com/NetworkManager/NetworkManager/pull/305
2019-03-05 09:54:56 +01:00
Thomas Haller
626beaf83e
wireguard: implement direct "peer-routes" for WireGuard allowed-ips ranges
2019-03-05 09:53:21 +01:00
Thomas Haller
d719ad31f0
wireguard: add "peer-routes" setting for WireGuard profiles
...
This setting is not yet implemented.
This adds new API for 1.16.0 and is an ABI break since 1.16-rc1.
2019-03-05 09:53:21 +01:00
Thomas Haller
d5e93ae613
wireguard: add "mtu" setting for WireGuard profiles
...
This adds new API for 1.16.0 and is an ABI break since 1.16-rc1.
2019-03-05 09:53:21 +01:00
Thomas Haller
096247e60b
device: expose nm_device_ip_config_new() as internal API
2019-03-05 09:53:21 +01:00
Thomas Haller
5e71f01605
device: merge stage3 and stage4 ip-config function for IPv4 and IPv6
2019-03-05 09:53:21 +01:00
Thomas Haller
03b708f7f7
device/trivial: rename wwan_ip_config to dev2_ip_config
...
dev2_ip_config (formerly wwan_ip_config) is only set by nm_device_set_dev2_ip_config()
(formerly nm_device_set_wwan_ip_config()), which is only called by NMDeviceModem.
For NMDeviceWireGuard we will also inject additional configuration
in the parent class. Rename and give it a wider purpose. The new name
merely indicates that this IP configuration is injected by a subclass
of NMDevice.
2019-03-05 09:53:21 +01:00
Thomas Haller
99abcf0105
device: merge IPv4 and IPv6 variant of nm_device_set_wwan_ip_config()
2019-03-05 09:53:21 +01:00
Thomas Haller
ee63e008d1
device: avoid setting an empty dev_ip_config_4 for activate_schedule_ip_config_result()
...
An empty NMIP4Config instance should have the same effect as %NULL.
Don't create it.
2019-03-05 09:53:21 +01:00
Thomas Haller
2f88523eef
device/trivial: rename dev_ip4_config field
...
So that it follows the naming pattern of similar fields,
that exist in a variant for IPv4 and IPv6.
2019-03-05 09:53:21 +01:00
Thomas Haller
515e003eff
device: unify IPv4 and IPv6 handling of IP state of device
2019-03-05 09:53:21 +01:00
Thomas Haller
ca14df5619
device/trivial: rename ip-state fields in NMDevicePrivate
...
Now they follow the naming pattern of ending in "_4" / "_6".
We will merge them and alias them to an "_x" array, like done
for similar fields.
2019-03-05 09:53:21 +01:00
Thomas Haller
2076550d8f
device/trivial: rename IpState to NMDeviceIPState
...
It will be moved to a header file.
2019-03-05 09:53:21 +01:00
Thomas Haller
1585eaf473
device: unify IPv4 and IPv6 device methods for IP configs
...
It is preferable to treat IPv4 and IPv6 in a similar manner.
This moves the places where we differ down the call-stack.
It also make it clearer how IPv6 behaves differently. I think this
is a bug, but leave it for now.
+ /* If IP had previously failed, move it back to IP_CONF since we
+ * clearly now have configuration.
+ */
+ if (priv->ip6_state == IP_FAIL)
+ _set_ip_state (self, AF_INET6, IP_CONF);
2019-03-05 09:53:21 +01:00
Thomas Haller
2be022ad68
core: use nm_connection_get_setting_ip_config() helper
2019-03-05 09:53:21 +01:00
Thomas Haller
02964c22a6
libnm-core: add nm_connection_get_setting_ip_config() helper
2019-03-05 09:53:21 +01:00
Thomas Haller
be107c75c9
core: accept %NULL as source argument for nm_utils_ipx_address_clear_host_address()
...
Just for convenience.
2019-03-05 09:53:21 +01:00
Beniamino Galvani
1d479c0ad5
merge: branch 'bg/nmcli-agent-fixes'
...
https://github.com/NetworkManager/NetworkManager/pull/307
(cherry picked from commit d943ea415f )
2019-03-05 09:45:32 +01:00
Beniamino Galvani
42304b34fd
clients: fix GVariantBuilder memory leak
...
Fixes: acf86f68b3
(cherry picked from commit 22c87f0df8 )
2019-03-05 09:45:02 +01:00
Beniamino Galvani
f1628ea6f1
clients: fix i/o stream memory leaks
...
Fixes: 5a0d67f739
(cherry picked from commit 91a644d4a5 )
2019-03-05 09:44:59 +01:00
Beniamino Galvani
efce1e34f2
clients: fix keyfile string memory leak
...
The return value of g_key_file_get_string() was leaked.
Fixes: 5a0d67f739
(cherry picked from commit 082ae508a0 )
2019-03-05 09:44:57 +01:00
Beniamino Galvani
72f40fc421
clients: fix double free
...
@secrets is unreferenced at the end of request_secrets_from_ui() and
so try_spawn_vpn_auth_helper() must take a reference to it.
Fixes: 1a0fc8d437
(cherry picked from commit b57a3a4cc6 )
2019-03-05 09:44:56 +01:00
Beniamino Galvani
d943ea415f
merge: branch 'bg/nmcli-agent-fixes'
...
https://github.com/NetworkManager/NetworkManager/pull/307
2019-03-05 09:42:20 +01:00
Beniamino Galvani
22c87f0df8
clients: fix GVariantBuilder memory leak
...
Fixes: acf86f68b3
2019-03-05 09:21:07 +01:00
Beniamino Galvani
91a644d4a5
clients: fix i/o stream memory leaks
...
Fixes: 5a0d67f739
2019-03-04 18:09:46 +01:00
Beniamino Galvani
082ae508a0
clients: fix keyfile string memory leak
...
The return value of g_key_file_get_string() was leaked.
Fixes: 5a0d67f739
2019-03-04 18:09:46 +01:00
Beniamino Galvani
b57a3a4cc6
clients: fix double free
...
@secrets is unreferenced at the end of request_secrets_from_ui() and
so try_spawn_vpn_auth_helper() must take a reference to it.
Fixes: 1a0fc8d437
2019-03-04 18:08:08 +01:00
Beniamino Galvani
526f1476db
manager: ignore ovs-system master when assuming connections
...
This change allows NM to assume after a restart a device that has been
enslaved externally to an ovs bridge.
https://bugzilla.redhat.com/show_bug.cgi?id=1676551
(cherry picked from commit 93bbe43695 )
2019-03-04 10:48:19 +01:00
Beniamino Galvani
93bbe43695
manager: ignore ovs-system master when assuming connections
...
This change allows NM to assume after a restart a device that has been
enslaved externally to an ovs bridge.
https://bugzilla.redhat.com/show_bug.cgi?id=1676551
2019-03-04 10:47:00 +01:00
Thomas Haller
6580f2931d
ifcfg-rh: avoid duplicate cache lookup in is_wifi_device()
2019-03-04 10:10:47 +01:00
Kristjan SCHMIDT
ba209fc4ea
po: update Esperanto (eo) translation
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/86
(cherry picked from commit da10058118 )
2019-02-26 19:21:36 +01:00
Kristjan SCHMIDT
da10058118
po: update Esperanto (eo) translation
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/86
2019-02-26 19:17:12 +01:00
Beniamino Galvani
a806e1b39b
wifi: merge branch 'bg/pmf-fix-issue129'
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129
(cherry picked from commit 60365f9dec )
2019-02-26 18:35:54 +01:00
Beniamino Galvani
b837561bb6
supplicant: fix setting pmf when the supplicant doesn't advertise support
...
wpa_supplicant only advertises pmf support since commit [1], which is
after 2.6. When using a version without that commit (for example,
plain 2.6), we would unconditionally set the global Pmf property to 1
(optional) and then skip setting the per-network property. The result
was that pmf was enabled without the possibility to disable it by
user. The correct behavior is instead to disable pmf on such versions.
[1] https://w1.fi/cgit/hostap/commit/?id=3cdb4ac074f76accf24a51d143db545afad2c90b
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129
(cherry picked from commit 560a35dd43 )
2019-02-26 18:35:09 +01:00
Beniamino Galvani
7cff3136f5
supplicant: clarify ready_count usage
...
(cherry picked from commit cab17ff8e0 )
2019-02-26 18:35:07 +01:00
Beniamino Galvani
60365f9dec
wifi: merge branch 'bg/pmf-fix-issue129'
...
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129
2019-02-26 18:32:14 +01:00
Beniamino Galvani
560a35dd43
supplicant: fix setting pmf when the supplicant doesn't advertise support
...
wpa_supplicant only advertises pmf support since commit [1], which is
after 2.6. When using a version without that commit (for example,
plain 2.6), we would unconditionally set the global Pmf property to 1
(optional) and then skip setting the per-network property. The result
was that pmf was enabled without the possibility to disable it by
user. The correct behavior is instead to disable pmf on such versions.
[1] https://w1.fi/cgit/hostap/commit/?id=3cdb4ac074f76accf24a51d143db545afad2c90b
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129
2019-02-26 18:31:24 +01:00
Beniamino Galvani
cab17ff8e0
supplicant: clarify ready_count usage
2019-02-26 18:31:24 +01:00
Thomas Haller
4c8ff6f220
examples: fix handling secrets in nm-wg-set
...
When setting any secrets via D-Bus' Update2 call, then
it assumes that all settings are reset. That means, when
we modify any secrets in the client, we need to first load
them all.
Anyway, load always all secrets, then we can also print them
in the get output.
Honor WG_HIDE_KEYS like `wg` does.
(cherry picked from commit 6aa9e52bd8 )
2019-02-26 09:40:57 +01:00
Thomas Haller
8b4247d31d
examples: improve hints about existing WireGuard profiles in nm-wg-set
...
(cherry picked from commit b5a458c5ff )
2019-02-26 09:40:56 +01:00
Thomas Haller
6aa9e52bd8
examples: fix handling secrets in nm-wg-set
...
When setting any secrets via D-Bus' Update2 call, then
it assumes that all settings are reset. That means, when
we modify any secrets in the client, we need to first load
them all.
Anyway, load always all secrets, then we can also print them
in the get output.
Honor WG_HIDE_KEYS like `wg` does.
2019-02-26 09:34:35 +01:00
Thomas Haller
b5a458c5ff
examples: improve hints about existing WireGuard profiles in nm-wg-set
2019-02-26 09:34:35 +01:00
Thomas Haller
ab80bf8f87
libnm,core: fix device TYPE for Wi-Fi P2P devices
...
Don't use "wifip2p" for the type description.
$ nmcli device
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected x
p2p-dev-wlan0 wifip2p disconnected --
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/87
(cherry picked from commit 8f6a8d0517 )
2019-02-26 09:14:13 +01:00
Thomas Haller
8f6a8d0517
libnm,core: fix device TYPE for Wi-Fi P2P devices
...
Don't use "wifip2p" for the type description.
$ nmcli device
DEVICE TYPE STATE CONNECTION
wlan0 wifi connected x
p2p-dev-wlan0 wifip2p disconnected --
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/87
2019-02-26 09:13:03 +01:00