platform: refactor marking cloned routes in platform

We handle cloned routes (that have rtm_flags RTM_F_CLONED) differently.
We used to mark such routes by hacking NMIPConfigSource to have a special
value. No longer do this, because it mixes different concepts.

Note that the rt_cloned filed fits into a hole in the aligment
of NMPlatformIPRoute. Thus there is almost no overhead to this
change.
This commit is contained in:
Thomas Haller
2016-04-11 15:32:45 +02:00
parent 9e83383223
commit e26fcce0f8
6 changed files with 20 additions and 10 deletions

View File

@@ -475,7 +475,6 @@ nmp_utils_ip_config_source_from_rtprot (guint rtprot)
NM_UTILS_ENUM2STR_DEFINE (nmp_utils_ip_config_source_to_string, NMIPConfigSource,
NM_UTILS_ENUM2STR (NM_IP_CONFIG_SOURCE_UNKNOWN, "unknown"),
NM_UTILS_ENUM2STR (NM_IP_CONFIG_SOURCE_RTPROT_KERNEL, "rtprot-kernel"),
NM_UTILS_ENUM2STR (_NM_IP_CONFIG_SOURCE_RTM_F_CLONED, "rtm-f-cloned"),
NM_UTILS_ENUM2STR (NM_IP_CONFIG_SOURCE_KERNEL, "kernel"),
NM_UTILS_ENUM2STR (NM_IP_CONFIG_SOURCE_SHARED, "shared"),
NM_UTILS_ENUM2STR (NM_IP_CONFIG_SOURCE_IP4LL, "ipv4ll"),