Commit Graph

22651 Commits

Author SHA1 Message Date
Lubomir Rintel
a1e6afc0b2 contrib/rpm: drop ldconfig scriptlets from Fedora 28+
In newer RPM file triggers in glibc package take care of this. While
these scriptlets whould do no harm there, removing them yields a tiny
theoretical performance improvement.
2019-03-07 15:28:56 +01:00
Lubomir Rintel
3326a87953 Revert "contrib/rpm: use "%ldconfig_scriptlets" for Fedora 30+"
This is utterly pointless. %ldconfig_scriptlets expand to an empty
string on Fedora 28+.

This reverts commit ad836541cb.
2019-03-07 15:28:56 +01:00
Lubomir Rintel
c10e61e21d contrib/rpm: drag in vala tools by the binary
The package's called either "vala" or "vala-tools". Sigh.
2019-03-07 15:28:56 +01:00
Lubomir Rintel
f8dde7014b Revert "contrib/rpm: require "vala" instead of "vala-tools" for Fedora 30+"
This is just plain ugly.

This reverts commit 0024485b5a.
2019-03-07 15:28:56 +01:00
Lubomir Rintel
27418b1851 Revert "contrib/rpm: remove Group tag for Fedora 30+"
Group tag is not required, though is harmless. We could either remove it,
or keep it, but there's absolutely no excuse for conditionalizing it.

Let's keep it for now, because rpm -i still prints it.

This reverts commit 1feeba6f1a.
2019-03-07 15:28:56 +01:00
Lubomir Rintel
f8578ddc2e contrib/checkpatch: check that we refer to commits properly 2019-03-07 10:55:30 +01:00
Lubomir Rintel
c411b8900f platform/linux: fix detection of IFA_FLAGS support
The condition got accidentally reversed, which means we're always
undecided and thus wrongly assuming support and never being able to set
any addresses.

This would bother the few that are struck with 3.4 android kernels. Very
few indeed, given this got unnoticed since 1.10.

Fixes: 8670aacc7c ('platform: cleanup detecting kernel support for IFA_FLAGS and IPv6LL')
(cherry picked from commit d551a0893e)
2019-03-07 10:20:19 +01:00
Lubomir Rintel
d551a0893e platform/linux: fix detection of IFA_FLAGS support
The condition got accidentally reversed, which means we're always
undecided and thus wrongly assuming support and never being able to set
any addresses.

This would bother the few that are struck with 3.4 android kernels. Very
few indeed, given this got unnoticed since 1.10.

Fixes: 8670aacc7c ('platform: cleanup detecting kernel support for IFA_FLAGS and IPv6LL')
2019-03-07 10:17:42 +01:00
Marco Trevisan (Treviño)
b5bbf8edc2 nm: Fix syntax on introspection annotations
Various annotations were added using multiple colons, while only one has
to be added or g-ir-introspect will consider them part of the description

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/94
(cherry picked from commit 73005fcf5b)
2019-03-07 10:09:23 +01:00
Marco Trevisan (Treviño)
73005fcf5b nm: Fix syntax on introspection annotations
Various annotations were added using multiple colons, while only one has
to be added or g-ir-introspect will consider them part of the description

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/94
2019-03-07 10:04:41 +01:00
Thomas Haller
7da44cf877 contrib/rpm: merge branch 'th/contrib-rpm-f30'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/93

(cherry picked from commit d804ad8119)
2019-03-07 09:58:08 +01:00
Thomas Haller
a227149bf2 contrib/rpm: remove Group tag for Fedora 30+
https://fedoraproject.org/wiki/Changes/Remove_Group_Tag

62adcbc888
(cherry picked from commit 1feeba6f1a)
2019-03-07 09:57:50 +01:00
Thomas Haller
c110c1983e contrib/rpm: use "%ldconfig_scriptlets" for Fedora 30+
https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets

5c6421bc88
(cherry picked from commit ad836541cb)
2019-03-07 09:57:49 +01:00
Thomas Haller
ace926e648 contrib/rpm: require "vala" instead of "vala-tools" for Fedora 30+
The "vala-tools" package was merged into "vala" [1]. While "vala"
now "Provides: vala-tools", update the build requirements for
Fedora 30 and newer.

[1] 82b21cc302

f6c878a04a
(cherry picked from commit 0024485b5a)
2019-03-07 09:57:48 +01:00
Thomas Haller
d804ad8119 contrib/rpm: merge branch 'th/contrib-rpm-f30'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/93
2019-03-07 09:55:08 +01:00
Thomas Haller
1feeba6f1a contrib/rpm: remove Group tag for Fedora 30+
https://fedoraproject.org/wiki/Changes/Remove_Group_Tag

62adcbc888
2019-03-07 09:53:50 +01:00
Thomas Haller
ad836541cb contrib/rpm: use "%ldconfig_scriptlets" for Fedora 30+
https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets

5c6421bc88
2019-03-07 09:53:50 +01:00
Thomas Haller
0024485b5a contrib/rpm: require "vala" instead of "vala-tools" for Fedora 30+
The "vala-tools" package was merged into "vala" [1]. While "vala"
now "Provides: vala-tools", update the build requirements for
Fedora 30 and newer.

[1] 82b21cc302

f6c878a04a
2019-03-07 09:53:50 +01:00
Beniamino Galvani
25fdf0ab3a wifi-p2p: fix failed assertion when releasing supplicant interface
Fix the following failed assertion:

  <debug> device[0x11dfec0] (p2p-dev-wlp4s0): P2P: Releasing WPA supplicant interface.
  <debug> supplicant: setting WFD IEs for P2P operation
  (../src/devices/nm-device.c:14769):_set_state_full: runtime check failed: (priv->in_state_changed == FALSE)
  <info>  device (p2p-dev-wlp4s0): state change: unmanaged -> unavailable (reason 'supplicant-failed', sys-iface-state: 'external')
  <debug> device[0x11dfec0] (p2p-dev-wlp4s0): add_pending_action (1): 'waiting-for-supplicant'

supplicant_interfaces_release() can be called during a state change
(for example by device_state_changed()) and so it can't trigger
another state change.

nm_device_wifi_p2p_set_mgmt_iface() now doesn't force an immediate
state change and only schedules a recheck-available. This means that
the device can be in an available state without
priv->mgmt_iface. Adapt the code to deal gracefully with that
situation. In particular, we need to cancel pending timeout sources
(priv->sup_timeout_id) that use the management interface.

Fixes: 27bc2cb22a

https://github.com/NetworkManager/NetworkManager/pull/302
(cherry picked from commit d2e95856e9)
2019-03-06 08:05:48 +01:00
Beniamino Galvani
d2e95856e9 wifi-p2p: fix failed assertion when releasing supplicant interface
Fix the following failed assertion:

  <debug> device[0x11dfec0] (p2p-dev-wlp4s0): P2P: Releasing WPA supplicant interface.
  <debug> supplicant: setting WFD IEs for P2P operation
  (../src/devices/nm-device.c:14769):_set_state_full: runtime check failed: (priv->in_state_changed == FALSE)
  <info>  device (p2p-dev-wlp4s0): state change: unmanaged -> unavailable (reason 'supplicant-failed', sys-iface-state: 'external')
  <debug> device[0x11dfec0] (p2p-dev-wlp4s0): add_pending_action (1): 'waiting-for-supplicant'

supplicant_interfaces_release() can be called during a state change
(for example by device_state_changed()) and so it can't trigger
another state change.

nm_device_wifi_p2p_set_mgmt_iface() now doesn't force an immediate
state change and only schedules a recheck-available. This means that
the device can be in an available state without
priv->mgmt_iface. Adapt the code to deal gracefully with that
situation. In particular, we need to cancel pending timeout sources
(priv->sup_timeout_id) that use the management interface.

Fixes: 27bc2cb22a

https://github.com/NetworkManager/NetworkManager/pull/302
2019-03-06 08:03:54 +01:00
Thomas Haller
bd73a542e8 core,wireguard: merge branch 'th/wireguard-routes'
https://github.com/NetworkManager/NetworkManager/pull/305

(cherry picked from commit 9b56d760af)
2019-03-05 12:25:54 +01:00
Thomas Haller
5bcd443e80 wireguard: implement direct "peer-routes" for WireGuard allowed-ips ranges
(cherry picked from commit 626beaf83e)
2019-03-05 12:23:59 +01:00
Thomas Haller
2d34d06e5f 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.

(cherry picked from commit d719ad31f0)
2019-03-05 12:23:59 +01: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
8068310125 device: expose nm_device_ip_config_new() as internal API
(cherry picked from commit 096247e60b)
2019-03-05 12:23:59 +01:00
Thomas Haller
97da3149f7 device: merge stage3 and stage4 ip-config function for IPv4 and IPv6
(cherry picked from commit 5e71f01605)
2019-03-05 12:23:59 +01:00
Thomas Haller
ec7d9d7115 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.

(cherry picked from commit 03b708f7f7)
2019-03-05 12:23:59 +01:00
Thomas Haller
0dcfe1a7e0 device: merge IPv4 and IPv6 variant of nm_device_set_wwan_ip_config()
(cherry picked from commit 99abcf0105)
2019-03-05 12:23:59 +01:00
Thomas Haller
f0e0d24fd6 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.

(cherry picked from commit ee63e008d1)
2019-03-05 12:23:59 +01:00
Thomas Haller
b9edea3200 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.

(cherry picked from commit 2f88523eef)
2019-03-05 12:23:59 +01:00
Thomas Haller
4f3510acb8 device: unify IPv4 and IPv6 handling of IP state of device
(cherry picked from commit 515e003eff)
2019-03-05 12:23:59 +01:00
Thomas Haller
b019a262b9 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.

(cherry picked from commit ca14df5619)
2019-03-05 12:23:59 +01:00
Thomas Haller
215f22cd6f device/trivial: rename IpState to NMDeviceIPState
It will be moved to a header file.

(cherry picked from commit 2076550d8f)
2019-03-05 12:23:59 +01:00
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