core/trivial: rename "source" field of addresses and routes

The "source" field of NMPlatformIPRoute (now "rt_source") maps to the
protocol field of the route. The source of NMPlatformIPAddress (now
"addr_source") has no direct equivalent in the kernel.

As their use is different, they should have different names. Also,
the name "source" is used all over the place. Hence give the fields
a more distinct name.
This commit is contained in:
Thomas Haller
2016-04-11 13:09:52 +02:00
parent 44753a590e
commit 6bf022359f
22 changed files with 173 additions and 175 deletions

View File

@@ -256,7 +256,7 @@ lease_to_ip4_config (const char *iface,
SD_DHCP_OPTION_IP_ADDRESS_LEASE_TIME,
end_time);
address.source = NM_IP_CONFIG_SOURCE_DHCP;
address.addr_source = NM_IP_CONFIG_SOURCE_DHCP;
nm_ip4_config_add_address (ip4_config, &address);
/* DNS Servers */
@@ -322,7 +322,7 @@ lease_to_ip4_config (const char *iface,
route.gateway = a.s_addr;
if (route.plen) {
route.source = NM_IP_CONFIG_SOURCE_DHCP;
route.rt_source = NM_IP_CONFIG_SOURCE_DHCP;
route.metric = default_priority;
nm_ip4_config_add_route (ip4_config, &route);
@@ -740,7 +740,7 @@ lease_to_ip6_config (const char *iface,
.timestamp = ts,
.lifetime = lft_valid,
.preferred = lft_pref,
.source = NM_IP_CONFIG_SOURCE_DHCP,
.addr_source = NM_IP_CONFIG_SOURCE_DHCP,
};
nm_ip6_config_add_address (ip6_config, &address);