Commit graph

21921 commits

Author SHA1 Message Date
Yuri Chornoivan
1e02ee4dc0 po: update Ukrainian (uk) translation (bgo#790215)
https://bugzilla.gnome.org/show_bug.cgi?id=790215
2017-11-13 12:36:42 +01:00
Thomas Haller
d44a3eb80c all: merge branch 'th/platform-routes-onlink-rh1428334'
https://bugzilla.redhat.com/show_bug.cgi?id=1428334
2017-11-13 11:51:08 +01:00
Thomas Haller
cb47ed0fcd platform/tests: add test for onlink route attribute 2017-11-13 11:41:02 +01:00
Thomas Haller
0ed49717ab all: support route-attribute "onlink" for IPv4
Kernel doesn't support it for IPv6.

This is especially useful, if you combine static routes
with DHCP. In that case, you might want to get the device-route
to the gateway automatically, but add a static-route for it.
2017-11-13 11:35:44 +01:00
Thomas Haller
88a40f960c platform: consider RTNH_F_ONLINK onlink flag for IPv4 routes
The "onlink" flag for IPv4 routes is part of the route ID.
Consider it in nm_platform_ip4_route_cmp().

Also, allow configuring the flag when adding a route.

Note that for IPv6, the onlink flag is still ignored.
Pretty much like kernel does.
2017-11-13 11:35:44 +01:00
Thomas Haller
81778f59f2 platform: track all rtm_flags for routes 2017-11-13 11:35:44 +01:00
Thomas Haller
433d2f8659 core: merge IPv4 and IPv6 version of _nm_ip_config_merge_route_attributes() 2017-11-13 11:35:44 +01:00
Thomas Haller
a9d1f5e543 shared: add nm_ip_addr_set() helper 2017-11-13 11:35:44 +01:00
Thomas Haller
632e8ac885 shared/trivial: move code 2017-11-13 11:35:44 +01:00
Thomas Haller
8948dbe117 platform: add generic NM_PLATFORM_IP_ROUTE_CAST() macro
A cast macro, that does some static type checking (of the pointer).
2017-11-13 11:35:44 +01:00
Thomas Haller
d5c9c95e96 core: use NM_CONSTCAST() for NM_IP_CONFIG_CAST() 2017-11-13 11:35:44 +01:00
Thomas Haller
557d83bf2d build: detect compiler features _Generic() and __auto_type in configure script
There is still a fallback detection in "shared/nm-utils/nm-macros-internal.h",
so that VPN-plugins and applet don't need to bother about adding these
configure checks.
2017-11-13 11:35:44 +01:00
Thomas Haller
bdfdabea51 shared: propagate constness in _NM_GET_PRIVATE_PTR()
The _NM_GET_PRIVATE() macro already preserved and propagated
the constness of @self to the resulting private pointer.

_NM_GET_PRIVATE_PTR() didn't do that. Extend the macro,
to make that possible.
2017-11-13 11:35:44 +01:00
Thomas Haller
03efc9e2c9 shared: fix detection of _Generic() support 2017-11-13 11:35:44 +01:00
Beniamino Galvani
a33baf8bf7 core: fix build without connectivity check
Fixes: 4dd30b784c

https://bugzilla.gnome.org/show_bug.cgi?id=790222
2017-11-12 10:33:32 +01:00
Beniamino Galvani
1193fb1b08 release: bump version to 1.10.0 2017-11-10 16:15:23 +01:00
Beniamino Galvani
4fce1b90bf release: update NEWS 2017-11-10 16:15:23 +01:00
Beniamino Galvani
cc6c140f5e po: make update-po 2017-11-10 16:15:22 +01:00
Beniamino Galvani
6dc6b0f3d8 device: silent compiler warning
Fix the following warning:

 src/devices/nm-device.c: In function ‘activation_source_schedule’:
 src/devices/nm-device.c:4995:9: error: ‘source_func’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   new_id = g_idle_add (source_func, self);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(cherry picked from commit bdfa7d882e)
2017-11-10 16:15:22 +01:00
Beniamino Galvani
bdfa7d882e device: silent compiler warning
Fix the following warning:

 src/devices/nm-device.c: In function ‘activation_source_schedule’:
 src/devices/nm-device.c:4995:9: error: ‘source_func’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   new_id = g_idle_add (source_func, self);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-11-10 16:11:25 +01:00
Beniamino Galvani
f8266cfde9 ofono: merge branch 'th/ofono-ip-config-fix'
Fixes for oFono support.
(cherry picked from commit f2ebf6dfef)
2017-11-10 15:25:29 +01:00
Thomas Haller
ef0977b7f0 ofono: refactor error handling in context_property_changed()
(cherry picked from commit 6781fad88f)
2017-11-10 15:22:32 +01:00
Thomas Haller
43987d8a60 ofono: fix creating IP config with proper ifindex of Interface
This was broken with the routing-rework. We need to determine
the ifindex on which the configuration applies.

(cherry picked from commit 52f0800987)
2017-11-10 15:22:31 +01:00
Thomas Haller
06e2d355f6 ofono: refactor error handling for missing Interface in context_property_changed()
(cherry picked from commit 481c15e287)
2017-11-10 15:22:30 +01:00
Thomas Haller
abbb62a813 ofono: fix leaks in context_property_changed()
(cherry picked from commit 99013e020b)
2017-11-10 15:22:28 +01:00
Beniamino Galvani
f2ebf6dfef ofono: merge branch 'th/ofono-ip-config-fix'
Fixes for oFono support.
2017-11-10 15:08:19 +01:00
Thomas Haller
6781fad88f ofono: refactor error handling in context_property_changed() 2017-11-10 15:07:57 +01:00
Thomas Haller
52f0800987 ofono: fix creating IP config with proper ifindex of Interface
This was broken with the routing-rework. We need to determine
the ifindex on which the configuration applies.
2017-11-10 15:07:57 +01:00
Thomas Haller
481c15e287 ofono: refactor error handling for missing Interface in context_property_changed() 2017-11-10 15:07:57 +01:00
Thomas Haller
99013e020b ofono: fix leaks in context_property_changed() 2017-11-10 15:07:57 +01:00
Francesco Giudici
364c88db6e libnm-core: fix "Since" notation in team and team-port settings.
Not "Since 1.12" but "Since: 1.12".

Fixes: 9715969b77
Fixes: 1c99d379eb
2017-11-10 12:15:39 +01:00
Beniamino Galvani
e4e6ed5b0a device: don't necessarily fail the connection when ipv4 DAD fails
Don't necessarily fail the entire connection if a duplicate IPv4
address is detected, but instead look at the may-fail property and at
the outcome of IPv6.

https://bugzilla.redhat.com/show_bug.cgi?id=1508001
(cherry picked from commit 14ad1d0cd1)
2017-11-09 22:30:27 +01:00
Beniamino Galvani
12a49cbdc7 device: add a new state-reason for DAD failures 2017-11-09 22:26:17 +01:00
Beniamino Galvani
14ad1d0cd1 device: don't necessarily fail the connection when ipv4 DAD fails
Don't necessarily fail the entire connection if a duplicate IPv4
address is detected, but instead look at the may-fail property and at
the outcome of IPv6.

https://bugzilla.redhat.com/show_bug.cgi?id=1508001
2017-11-09 22:26:17 +01:00
Francesco Giudici
9022b14478 merge: branch 'fg/team_abstraction_rh1398925'
https://bugzilla.redhat.com/show_bug.cgi?id=1398925
2017-11-09 17:57:01 +01:00
Francesco Giudici
3e34e404b4 libnm-core: enforce team and team-port defaults
Rework a bit the way default values are check, set and aligned.
2017-11-09 17:56:15 +01:00
Francesco Giudici
81527f1a09 cli: add team-port properties 2017-11-09 17:56:15 +01:00
Francesco Giudici
ec60e01d39 libnm-core: enforce team-port config and properties alignment
Ensure .config is aligned when an explicit team-port is set and vice
versa
2017-11-09 17:56:15 +01:00
Francesco Giudici
1c99d379eb libnm-core: add explicit team properties to NMSettingTeamPort 2017-11-09 17:56:15 +01:00
Francesco Giudici
e1220c933f cli: add team properties 2017-11-09 17:56:15 +01:00
Francesco Giudici
fc3b7d61e2 libnm-core: enforce team config and properties alignment
Ensure .config is aligned when an explicit team property is set and vice versa.
2017-11-09 17:56:15 +01:00
Francesco Giudici
9715969b77 libnm-core: add explicit team properties to NMSettingTeam 2017-11-09 17:56:15 +01:00
Francesco Giudici
b4c9bcd49f libnm-core: add inline functions to update team json config
Add functions and structure to simplify json config and team property
enforcement. These will be used in both NMSettingTeam and
NMSettingTeamPort.
2017-11-09 17:56:15 +01:00
Francesco Giudici
dadf710ee3 libnm-core: add functions to align team json config to exposed properties 2017-11-09 17:56:15 +01:00
Francesco Giudici
b6c0498b04 shared: add json_boolean_value support in jansson.h
Released in jansson version 2.7, added for compatibility with older
jannson verions.
2017-11-09 17:56:15 +01:00
Thomas Haller
931910b7de all: merge branch 'th/jansson' 2017-11-09 17:40:32 +01:00
Thomas Haller
595aaf0f3e all: update compatiblity for older libjansson versions
- nm-ovsdb.c uses json_load_callback(), which is jansson v2.4.
  Hence, it cannot build the OVS plugin in our Travis-CI, which is
  still on Ubuntu Precise. Disable building the plugin in travis and
  add a compiler warning when building against an older version.

- since jansson v2.3, there is json_object_key_to_iter() to implement
  the for-each macros. Use it in json_object_foreach_safe() when
  available.
2017-11-09 17:34:39 +01:00
Thomas Haller
650a47e16c all: use nm-jansson.h 2017-11-09 17:32:22 +01:00
Thomas Haller
11b241eb1c shared: add jansson.h compatibility and utils header 2017-11-09 17:32:22 +01:00
Francesco Giudici
85cc5db7a4 shared: trivial: add space before comment close 2017-11-09 17:17:00 +01:00