NetworkManager/src/platform/tests
Thomas Haller 4c2410bc92 platform: extend NMIPConfigSource to preserve the rtm_protocol field
For addresses (NMPlatformIPAddress) the @addr_source field is ignored
on a platform level. That is, all addresses inside the platform cache
have this value set to NM_IP_CONFIG_SOURCE_KERNEL. Maybe, for that reason,
the source should not be a part of the NMPlatformIPAddress structure, but
it is convenient for users to piggy back the source inside the platform
address structure.

For routes, the source is stored in NMPlatformIPRoute's @rt_source
field. When adding a route to kernel, we set the @rtm_protocol of the
route depending on the source. However, we want to map different source
values to the same protocol value.

On the other hand, when kernel sends us a route that gets put inside
the cache, we must preserve the protocol value and must not map
different protocol values to the same source.
The reason is, that a user can add two routes that only differ by
@rtm_protocol. In that sense, the @rtm_protocol fields is part of the
unique ID of a kernel route, and thus different values must map to
different sources.

Fix this, by extending the range of NMIPConfigSource to contain
a range of protocol fields.
2016-04-28 12:53:21 +02:00
..
.gitignore platform: add nmp-object.h file 2015-06-17 11:23:51 +02:00
Makefile.am platform/tests: change build order to first build test-common.c and platform core 2016-04-11 11:26:37 +02:00
monitor.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
test-address.c platform/tests: add @platform argument to nmtstp functions 2016-04-11 11:26:37 +02:00
test-cleanup.c platform/tests/trivial: rename init_tests() and setup_tests() function 2016-04-11 11:26:37 +02:00
test-common.c platform/tests: improve nmtstp_wait_for_signal() to return number of signals 2016-04-11 11:26:37 +02:00
test-common.h platform/tests: improve nmtstp_wait_for_signal() to return number of signals 2016-04-11 11:26:37 +02:00
test-general.c platform/tests: use nm_linux_platform_new() 2016-04-11 11:26:37 +02:00
test-link.c platform/tests: add @platform argument to nmtstp functions 2016-04-11 11:26:37 +02:00
test-nmp-object.c platform: don't create udev client if udev isn't used 2016-03-07 11:58:01 +01:00
test-route.c platform: extend NMIPConfigSource to preserve the rtm_protocol field 2016-04-28 12:53:21 +02:00