summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* all: support route-attribute "onlink" for IPv4th/platform-routes-onlink-rh1428334Thomas Haller2017-11-109-49/+141
| | | | | | | | 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.
* platform: consider RTNH_F_ONLINK onlink flag for IPv4 routesThomas Haller2017-11-103-5/+11
| | | | | | | | | | 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.
* platform: track all rtm_flags for routesThomas Haller2017-11-105-31/+70
|
* core: merge IPv4 and IPv6 version of _nm_ip_config_merge_route_attributes()Thomas Haller2017-11-103-92/+79
|
* shared: add nm_ip_addr_set() helperThomas Haller2017-11-101-0/+13
|
* shared/trivial: move codeThomas Haller2017-11-101-17/+17
|
* platform: add generic NM_PLATFORM_IP_ROUTE_CAST() macroThomas Haller2017-11-101-16/+4
| | | | A cast macro, that does some static type checking (of the pointer).
* core: use NM_CONSTCAST() for NM_IP_CONFIG_CAST()Thomas Haller2017-11-102-27/+45
|
* build: detect compiler features _Generic() and __auto_type in configure scriptThomas Haller2017-11-102-1/+24
| | | | | | 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.
* shared: propagate constness in _NM_GET_PRIVATE_PTR()Thomas Haller2017-11-103-5/+31
| | | | | | | | 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.
* shared: fix detection of _Generic() supportThomas Haller2017-11-101-1/+1
|
* libnm-core: fix "Since" notation in team and team-port settings.Francesco Giudici2017-11-102-22/+22
| | | | | | | Not "Since 1.12" but "Since: 1.12". Fixes: 9715969b77300f47478b58482375dcd07dba1e85 Fixes: 1c99d379eb7ef1947beb4176a9611e404d1b220f
* device: add a new state-reason for DAD failuresBeniamino Galvani2017-11-093-3/+8
|
* device: don't necessarily fail the connection when ipv4 DAD failsBeniamino Galvani2017-11-091-4/+4
| | | | | | | | 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
* merge: branch 'fg/team_abstraction_rh1398925'Francesco Giudici2017-11-0911-3/+1832
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1398925
| * libnm-core: enforce team and team-port defaultsfg/team_abstraction_rh1398925Francesco Giudici2017-11-096-50/+81
| | | | | | | | Rework a bit the way default values are check, set and aligned.
| * cli: add team-port propertiesFrancesco Giudici2017-11-091-0/+47
| |
| * libnm-core: enforce team-port config and properties alignmentFrancesco Giudici2017-11-091-0/+50
| | | | | | | | | | Ensure .config is aligned when an explicit team-port is set and vice versa
| * libnm-core: add explicit team properties to NMSettingTeamPortFrancesco Giudici2017-11-094-0/+223
| |
| * cli: add team propertiesFrancesco Giudici2017-11-091-0/+179
| |
| * libnm-core: enforce team config and properties alignmentFrancesco Giudici2017-11-092-2/+169
| | | | | | | | Ensure .config is aligned when an explicit team property is set and vice versa.
| * libnm-core: add explicit team properties to NMSettingTeamFrancesco Giudici2017-11-094-2/+745
| |
| * libnm-core: add inline functions to update team json configFrancesco Giudici2017-11-091-0/+81
| | | | | | | | | | | | Add functions and structure to simplify json config and team property enforcement. These will be used in both NMSettingTeam and NMSettingTeamPort.
| * libnm-core: add functions to align team json config to exposed propertiesFrancesco Giudici2017-11-092-1/+304
| |
| * shared: add json_boolean_value support in jansson.hFrancesco Giudici2017-11-091-0/+5
|/ | | | | Released in jansson version 2.7, added for compatibility with older jannson verions.
* all: merge branch 'th/jansson'Thomas Haller2017-11-096-37/+80
|\
| * all: update compatiblity for older libjansson versionsth/janssonThomas Haller2017-11-093-7/+20
| | | | | | | | | | | | | | | | | | | | | | - 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.
| * all: use nm-jansson.hThomas Haller2017-11-093-37/+4
| |
| * shared: add jansson.h compatibility and utils headerThomas Haller2017-11-092-0/+63
|/
* shared: trivial: add space before comment closeFrancesco Giudici2017-11-091-1/+1
|
* shared: make NM_CONSTCAST() macro variadicThomas Haller2017-11-094-57/+86
| | | | | | | | | | | | | | We need to pass more alias-types. Instead of having numbered versions, use variadic number of macro arguments. Also, fix build failure with old compiler: In file included from src/nm-ip6-config.c:24: ./src/nm-ip6-config.h:44:29: error: controlling expression type 'typeof (ipconf_iter->current->obj)' (aka 'const void *const') not compatible with any generic association type *out_address = has_next ? NMP_OBJECT_CAST_IP6_ADDRESS (ipconf_iter->current->obj) : NULL; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: b1810d7a68d188aa8f36a0e23a7be705a742b1aa
* shared: rework _NM_GET_PRIVATE() to use _Generic()Thomas Haller2017-11-093-47/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | _NM_GET_PRIVATE() used typeof() to propagate constness of the @self pointer. However, that means, it could only be used with a self pointer of the exact type. That means, you explicitly had to cast from (GObject *) or from (void *). The requirement is cumbersome, and often led us to either create @self pointer we didn't need: NMDeviceVlan *self = NM_DEVICE_VLAN (device); NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self); or casting: NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE ((NMDevice *) device); In both cases we forcefully cast the source variable, loosing help from the compiler to detect a bug. For "nm-linux-platform.c", instead we commonly have a pointer of type NMPlatform. Hence, we always forcefully cast the type via _NM_GET_PRIVATE_VOID(). Rework the macro to use _Generic(). If compiler supports _Generic(), then we will get all compile time checks as desired. If the compiler doesn't support _Generic(), it will still work. You don't get the compile-time checking of course, but you'd notice that something is wrong once you build with a suitable compiler.
* checkpoint: add libnm supportBeniamino Galvani2017-11-0917-59/+1270
|\ | | | | | | | | | | Add support for checkpoint/rollback functionality to libnm. https://bugzilla.redhat.com/show_bug.cgi?id=1496739
| * examples: add checkpoint example using python gobject-introspectionBeniamino Galvani2017-11-091-0/+130
| |
| * libnm: add checkpoint supportBeniamino Galvani2017-11-0910-0/+1008
| |
| * core: export checkpoint list over D-BusBeniamino Galvani2017-11-095-4/+68
| |
| * checkpoint: track checkpoints in a listBeniamino Galvani2017-11-091-27/+41
| | | | | | | | | | Checkpoints will be exported over D-Bus and they must be presented in a predictable order. Keep them in a list ordered by creation time.
| * checkpoint: don't include unrealized devicesBeniamino Galvani2017-11-093-24/+17
| | | | | | | | | | | | | | | | Don't include unrealized devices in checkpoint because, as the name says, they are not real. While at it, remove nm_manager_get_device_paths() as it is no longer used.
| * checkpoint: specify path of already existing checkpoint on errorBeniamino Galvani2017-11-091-3/+5
| |
| * libnm: don't invert order in array propertiesBeniamino Galvani2017-11-091-1/+1
|/ | | | | The order of elements in array properties was inverted when reconstructing the array. Keep the original order from D-Bus.
* core: merge branch 'th/dns-ip-config-unify'Thomas Haller2017-11-096-214/+199
|\
| * core: merge IPv4 and IPv6 implementations in NMDnsManagerth/dns-ip-config-unifyThomas Haller2017-11-092-208/+95
| |
| * core: add NMIPConfig helpersThomas Haller2017-11-092-6/+86
| | | | | | | | | | | | For now, hack some generic accessors to the NMIP4Config/NMIP6Config type. Eventually, NMIP4Config and NMIP6Config should get merged in one class.
| * libnm: add internal helper function nm_utils_inet_ntop()Thomas Haller2017-11-092-0/+18
|/
* build: fix make distcheckBeniamino Galvani2017-11-081-3/+7
| | | | | | | | | | | | | | | | | | | | | | Fixes the following errors in 'make distcheck': 1) GEN libnm/fake-typelib/NMClient.typelib failed to open 'libnm/fake-typelib/NMClient.typelib.tmp': No such file or directory make[2]: *** [libnm/fake-typelib/NMClient.typelib] Error 1 2) GEN libnm/fake-typelib/typelibs.c ../../libnm/fake-typelib/typelibs.gresource.xml: Failed to locate “NetworkManager.typelib” in any source directory. make[1]: *** [Makefile:17790: libnm/fake-typelib/typelibs.c] Error 1 3) ERROR: files left in build directory after distclean: ./libnm/fake-typelib/typelibs.c ./libnm/fake-typelib/NMClient.typelib ./libnm/fake-typelib/NetworkManager.typelib Fixes: 4d1f090aedf05c0e2955d431638e311d1e18a52f
* core: replace nm_dns_ip_config_data_get_dns_priority()Thomas Haller2017-11-085-22/+21
| | | | | Add instead nm_ip_config_get_dns_priority(). If we want to treat NMIP4Config/NMIP6Config generically, then the accessor should be right there.
* core: add generic opaque NMIPConfig typeThomas Haller2017-11-082-0/+34
| | | | | One day, I hope to merge NMIP4Config and NMIP6Config implementations. A small step, and a typesafe cast-macro.
* policy: merge IPv4 and IPv6 implementation of update_ip_dns()Thomas Haller2017-11-083-101/+52
|
* core: merge branch 'th/autoconnect-rh1401515-3'Thomas Haller2017-11-088-171/+162
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1401515
| * policy: don't block autoconnect for connections when disconnecting software ↵th/autoconnect-rh1401515Thomas Haller2017-11-081-39/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devices This was added by commit 979b8920b465867ea248dee23a8a290da28f75e5 (core: move virtual device autoconnect tracking bits out of NMManager) to avoid autoconnecting software devices repeatedly. That was done, because disconnecting a software device would delete the NMDevice instance, and there is no property on a device to prevent autoconnect. In the meantime, we only unrealize software devices and don't delete them entirely. Also, the autoconnect-blocked flags of the device are preserved when the device unrealized. It was anyway odd, that deactivating one software-device would block autoconnection for all matching connections.