Commit graph

14698 commits

Author SHA1 Message Date
Thomas Haller
d6478fa764 platform: refactor calling event_seq_check()
This makes more sense with the next commit.

(cherry picked from commit 8bf635af0e)
2016-04-12 11:14:01 +02:00
Thomas Haller
c0e0e5e92c platform: refactor delayed_action_wait_for_nl_response_complete()
(cherry picked from commit 90550a276b)
2016-04-12 11:14:01 +02:00
Thomas Haller
a20e11d268 platform: #ifdef out nlh_seq_last_handled if it's unused
This is not for performance. It's to separate the relavant
parts from a part that is only for logging/asserts.

(cherry picked from commit c59687c6b2)
2016-04-12 11:14:01 +02:00
Thomas Haller
53823384b5 platform: add macro FOR_EACH_DELAYED_ACTION()
(cherry picked from commit 15e357c30a)
2016-04-12 11:14:01 +02:00
Thomas Haller
c7f62fcd81 platform: expose nmp_utils_ip_config_source_to/from_rtprot()
Will be used also from the tests.

(cherry picked from commit 198baca830)
2016-04-12 11:14:01 +02:00
Thomas Haller
86e4975c60 platform/tests: improve nmtstp_wait_for_signal() to return number of signals
Instead of returning only TRUE/FALSE, return the number of signals
that were received while waiting. This make the API cleared, because
previously I always had to check anew whether wait-for-signal returns
TRUE or FALSE on timeout.

Also, add nmtstp_assert_wait_for_signal() and nmtstp_assert_wait_for_signal_until()
macros.

(cherry picked from commit af55476bf1)
2016-04-12 11:14:01 +02:00
Thomas Haller
a79a94fcfd platform/tests: add @platform argument to nmtstp functions
This allows tests to use these functions on a different platform instance
then on the singleton. The change makes the argument list longer, which is
unfortunate. On the other hand, it makes those functions more useful
in general.

You can't have it all.

Also, they now follow the pattern of most functions in NM where the type
is a singleton: you always pass the singleton to the function, although
in the usual case there is only one singleton instance. This allows to
use the function also on the non-singleton instance.

(cherry picked from commit c4151ebb5b)
2016-04-12 11:14:01 +02:00
Thomas Haller
df74df710e platform/tests: change build order to first build test-common.c and platform core
(cherry picked from commit 468501d0b0)
2016-04-12 11:14:01 +02:00
Thomas Haller
bd76c1e2d0 platform/tests/trivial: rename ip4_route_exists() functions to have nmtstp prefix
(cherry picked from commit f8f8c516e0)
2016-04-12 11:14:01 +02:00
Thomas Haller
7d6b286e1f platform/tests/trivial: rename init_tests() and setup_tests() function
Make it clear that they are nmtstp functions, i.e. they are found
in the header "test-common.h".

(cherry picked from commit 25d826ec49)
2016-04-12 11:14:01 +02:00
Thomas Haller
a314272d46 platform/tests: cleanup includes
(cherry picked from commit 93c81a809d)
2016-04-12 11:14:01 +02:00
Thomas Haller
bbec8844e2 platform/tests/trivial: move code around
(cherry picked from commit 56753ee41f)
2016-04-12 11:14:01 +02:00
Thomas Haller
04890bc709 platform/tests: use nm_linux_platform_new()
(cherry picked from commit 35e7703bdc)
2016-04-12 11:14:01 +02:00
Thomas Haller
d306ac633a platform: add NM_PLATFORM_NETNS_SUPPORT_DEFAULT
(cherry picked from commit d6b3081f7b)
2016-04-12 11:14:01 +02:00
Thomas Haller
b5bd562614 platform: add nm_linux_platform_new() constructor
(cherry picked from commit 45a9a6b30b)
2016-04-12 11:14:01 +02:00
Thomas Haller
4873850fd4 platform: change @plen field of NMPlatformIPxAddress to type guint8
On netlink layer, this field is uint8_t/uchar.

A larger (signed) plen makes no sense. Adjust the signatures
to have only guint8.

(cherry picked from commit 44768f0311)
2016-04-12 11:14:01 +02:00
Thomas Haller
08cce6c0ef platform: change @plen field of NMPlatformIPxRoute to type guint8
On netlink layer, this field is uint8_t/uchar.

A larger (signed) plen makes no sense. Adjust the signatures
to have only guint8.

(cherry picked from commit 14ee5dd2f8)
2016-04-12 11:14:01 +02:00
Thomas Haller
395a09cfc7 nmp-object: refactor handling of NMPCacheId to consider only relevant part of union
NMPCacheId is a union with fields for all known NMPCacheIdTypes.
Up to now, we always cloned the entire union, computed the hash
over all (possibly unset) fields and used memcmp() unanimously.

That was ok, because NMPCacheId was 16 bytes in total and cache-id
types that consumed less bytes didn't have a large overhead.

Next, we will add a new cache id type which increases the size of
NMPCacheId to 24 bytes. So, while possibly only a fraction of the
instances is that large, they would all have to pay that price.

Change that to consider and clone only those parts of the id
that are actually used.

(cherry picked from commit b1e3deaf2f)
2016-04-12 11:14:01 +02:00
Thomas Haller
72f36d1b5a nmp-object: refactor initializing NMPCacheId
As we get more NMPCacheIdType values, it's better to have for
each type a pre-declared list of supported types, instead of
iterating over all types and letting _nmp_object_init_cache_id()
figure out that the cache-id-type is unsupported on that object.

(cherry picked from commit fe78ae0b6a)
2016-04-12 11:14:01 +02:00
Thomas Haller
98766a96f2 shared: add _nm_packed macro for __attribute__((packed))
(cherry picked from commit 9a1e0b97da)
2016-04-12 11:14:01 +02:00
Thomas Haller
a0b561eda3 ip6-config: use nm_utils_ip6_address_same_prefix().
Instead of same_prefix() in nm_ip6_config_destination_is_direct(),
use nm_utils_ip6_address_same_prefix().

(cherry picked from commit 966fcdba1b)
2016-04-12 11:14:01 +02:00
Thomas Haller
5217586085 core: add nm_utils_ip6_address_same_prefix() util
(cherry picked from commit db3175d9c0)
2016-04-12 11:14:01 +02:00
Thomas Haller
ba5d2103fe dnsmasq/tests: make use of nmtst util to initialize NMPlatformIP4Address
(cherry picked from commit a18fca36a5)
2016-04-12 11:14:01 +02:00
Thomas Haller
3e5a6893c8 ip-config/tests: refactor tests to use utilities from "nm-test-utils.h"
(cherry picked from commit b3daf156de)
2016-04-12 11:14:01 +02:00
Thomas Haller
71cd1935d9 nmtst: add nmtst_platform_ip4_address() util
(cherry picked from commit 2e6ec6d8ac)
2016-04-12 11:14:01 +02:00
Thomas Haller
6451e9ce73 nmtst: add nmtst_rand_buf() util
(cherry picked from commit 0e78ce5ed6)
2016-04-12 11:14:01 +02:00
Thomas Haller
e3276ba6fe core/utils: add NM_UTILS_LOOKUP_ITEM_IGNORE_OTHER() switch case
NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT() is useful because unless
compiled with NM_MORE_ASSERTS, there is no assertion.
An assertion includes the function name, and can make the
function ineligible for inlining.

(cherry picked from commit fbfe2ef216)
2016-04-12 11:14:01 +02:00
Thomas Haller
3ec40f9fa9 dnsmasq: fix using '%' delimiter to scope link local with zone-id
Since long, dnsmasq supports scoping the IPv6 address
with '@<interface-name>'. Since 2.58, it also supports
'%' as delimiter, which is the standard way to specify
the zone-id (rfc6874).

Since 2.73, specifying the scope with '@' as "server"
address is no longer working properly, thus breaking
NetworkManager with dnsmasq >= 2.73.

To work around that, use '%' delimiter. That breaks pre-2.58
users that have a DNS server on a link local address, but that
seems acceptable as that version was released in January 2012.

https://bugzilla.gnome.org/show_bug.cgi?id=764839
(cherry picked from commit c328cf52f2)
2016-04-11 11:14:37 +02:00
Beniamino Galvani
ae879bdeba ppp-manager: don't modify the applied connection
The applied connection must not be modified during the activation. If
the PPP setting needs to be changed when activating a PPPoE
connection, make a copy to prevent the following error:

 could not get secrets:
 GDBus.Error:org.freedesktop.NetworkManager.Settings.Failed:
 The connection was modified since activation

https://bugzilla.redhat.com/show_bug.cgi?id=1324895
(cherry picked from commit 76309ebe79)
2016-04-08 15:15:15 +02:00
Rafael Fontenelle
d9e9a89170 po: update Brazilian Portuguese (pt_BR) translation (bgo#764690)
https://bugzilla.gnome.org/show_bug.cgi?id=764690
(cherry picked from commit 2a485060c9)
2016-04-07 16:29:26 +02:00
Lubomir Rintel
aab24b4e10 release: bump version to 1.1.93 (1.2-rc1) 2016-04-05 22:31:33 +02:00
Lubomir Rintel
f4b4e35c79 release: add version 1.4 macros 2016-04-05 22:22:58 +02:00
Thomas Haller
9152dec99f build: disable deprecation checks for internal compilation
For internal compilation we want to be able to use deprecated
API without warnings.

Define the version min/max macros to effectively disable deprecation
warnings.

However, don't do it via CFLAGS option in the makefiles, instead hack it
to "nm-default.h". After all, *every* source file that is for internal
compilation needs to include this header as first.
2016-04-05 22:22:58 +02:00
Lubomir Rintel
29cfb144a8 man: gitignore man7 2016-04-05 20:30:43 +02:00
Colin Walters
c976f983eb build: make man page hardlinks conditional on having man pages
Otherwise we fail since they don't exist.  We have to carefully
implement an "or" condition for the cases of having prebuilt manpages
in a tarball, vs actually building them from source.
2016-04-05 18:15:38 +02:00
Lubomir Rintel
9a68f12737 po: update Slovak translation 2016-04-05 15:29:11 +02:00
Lubomir Rintel
b0862e759a po: fix line terminations
Seems like Zanata makes it easy to make this mistake if it's just a
warning.

Turn the string back to fuzzy if unsure.
2016-04-05 14:58:33 +02:00
Lubomir Rintel
cc8016073b merge: branch 'lr/docbook'
Various documentation improvements.
2016-04-05 14:38:11 +02:00
Lubomir Rintel
a8e8e76641 dbus: fix up the XML formatting
The conversion script didn't do a very good job. It got fired.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
015c061a16 dbus: correct the NMDevice::StateReason type 2016-04-05 14:37:51 +02:00
Lubomir Rintel
2ae34aef9f dbus: correct the links to types
gdbus-codegen is not smart enough to understand #Type, include raw
docbook directly.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
4e8fdb20d1 Revert "dbus: tool to convert documentation annotations"
Not needed anymore.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
6e2b188361 dbus: convert the annotations to gtk-doc blocks 2016-04-05 14:37:51 +02:00
Lubomir Rintel
5c5fd96d2b dbus: tool to convert documentation annotations 2016-04-05 14:37:51 +02:00
Lubomir Rintel
2c3c83370b dbus: move NMWimaxNspNetworkType to nm-dbus-interface.h
It's an enum used on D-Bus.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
ccf1d5bd94 dbus: remove the telepathy annotations
We now generate documentation with gdbus-codegen and these are now
useless.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
0fc0cc68fc man: move nmcli-examples to section 7
It really is not a configuration file and doesn't belong to section 5.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
20300fd7db man: make the templated manuals a bit more consistent with the rest
Use the docbook tags wherever appropriate.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
60582bf443 man: include version from a XML entity
This way it's consistently used across all manual page without a need
for XSL templating.

Also, the entities file could in future possibly be used to template the
build-time configurables such as filesystem paths or bug tracker URL.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
8035b5b03b man: drop dates
It's injected from the makefile, but not even used consistently or included in
the resulting render of manual page. Which is good, otherwise we'd have a
non-reproducible build with possible multilib conflicts if rendered around
midnight.
2016-04-05 14:37:50 +02:00